actions.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. # Drop man pages to regenerate them
  12. shelltools.unlink("man/*.[18]")
  13. autotools.configure()
  14. def build():
  15. autotools.make()
  16. def install():
  17. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  18. # Install video quirks
  19. shelltools.copytree("../video-quirks", "%s/usr/lib/pm-utils" % get.installDIR())
  20. # Create some initial directories
  21. for d in ("locks", "storage"):
  22. pisitools.dodir("/run/pm-utils/%s" % d)
  23. pisitools.dodoc("COPYING", "ChangeLog", "AUTHORS")
  24. # nm >=0.8.2 has native udev suspend/resume support
  25. pisitools.remove("/usr/lib/pm-utils/sleep.d/55NetworkManager")
  26. # Remove hooks that cause hardware failure or don't make sense at all
  27. pisitools.remove("/usr/lib/pm-utils/power.d/harddrive")
  28. pisitools.remove("/usr/lib/pm-utils/power.d/disable_wol")