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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. #notify-0.8
  12. #pisitools.dosed("applet.py", "'0.7'", "'0.8'")
  13. #pisitools.dosed("jobviewer.py", "'0.7'", "'0.8'")
  14. # we are using different paths
  15. pisitools.dosed("cupshelpers/cupshelpers.py", "\/lib64\/", "\/lib\/")
  16. pisitools.dosed("troubleshoot/CheckUSBPermissions.py", "\/usr\/bin\/getfacl", "\/bin\/getfacl")
  17. pisitools.dosed("Makefile.am", "xmlto man", "xmlto --skip-validation man")
  18. for i in ["README", "ChangeLog"]:
  19. shelltools.touch(i)
  20. #autotools.autoreconf("-fi")
  21. shelltools.system("./bootstrap")
  22. autotools.configure("--with-udev-rules \
  23. --with-systemdsystemunitdir=no \
  24. --sysconfdir=/etc")
  25. def build():
  26. autotools.make()
  27. def install():
  28. autotools.rawInstall("DESTDIR=%s udevrulesdir=/lib/udev/rules.d udevhelperdir=/lib/udev" % get.installDIR())
  29. pisitools.insinto("/usr/lib/python3.11/site-packages/cupshelpers", "build/lib/cupshelpers/*.py")
  30. pisitools.dodir("/run/udev-configure-printer")
  31. pisitools.dodoc("README", "AUTHORS", "NEWS", "COPYING", "ChangeLog")