actions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. def setup():
  11. autotools.configure("--sysconfdir=/etc")
  12. def build():
  13. shelltools.export("CFLAGS", "-DNDEBUG %s" % get.CFLAGS())
  14. autotools.make('CC="%s" CFLAGS="%s -DLANG_EN"' % (get.CC(), get.CFLAGS()))
  15. autotools.make('-C ppa_protocol CC="%s" CFLAGS="%s"' % (get.CC(), get.CFLAGS()))
  16. def install():
  17. autotools.install("BINDIR=%(install)s/usr/bin \
  18. CONFDIR=%(install)s/etc \
  19. MANDIR=%(install)s/usr/share/man/man1" % { "install": get.installDIR()})
  20. pisitools.dobin("utils/Linux/detect_ppa")
  21. pisitools.dobin("utils/Linux/test_ppa")
  22. pisitools.insinto("/usr/share/pnm2ppa/lpd", "lpd/*")
  23. pisitools.insinto("/usr/share/pnm2ppa/pdq", "pdq/*")
  24. pisitools.doexe("lpd/lpdsetup", "/usr/share/pnm2ppa/lpd")
  25. pisitools.doexe("sample_scripts/*", "/usr/share/pnm2ppa/sample_scripts")
  26. pisitools.doexe("pdq/gs-pnm2ppa", "/etc/pdq/drivers/ghostscript")
  27. pisitools.doexe("pdq/dummy", "/etc/pdq/interfaces")
  28. pisitools.dohtml("*")
  29. shelltools.cd("docs/en")
  30. pisitools.dodoc("CALIBRATION*txt", "COLOR*txt", "PPA*txt", "RELEASE*", "CREDITS", "LICENSE", "README", "TODO")