actions.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/copyleft/gpl.txt.
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. def build():
  10. #pisilinux icin grub2 olarak ayarla
  11. shelltools.system("sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
  12. linux-boot-probes/common/50mounted-tests")
  13. shelltools.system("sed -i -e 's|grub-mount|grub2-mount|g' os-probes/common/50mounted-tests \
  14. linux-boot-probes/common/50mounted-tests common.sh")
  15. shelltools.system("sed -i -e 's|/boot/grub/grub.cfg|/boot/grub2/grub.cfg|g' linux-boot-probes/mounted/common/40grub2 \
  16. linux-boot-probes/mounted/x86/40grub")
  17. shelltools.unlink("Makefile")
  18. autotools.make("newns")
  19. def install():
  20. pisitools.dodoc("debian/copyright", "debian/changelog", "README")
  21. pisitools.dobin("os-prober")
  22. pisitools.dobin("linux-boot-prober")
  23. #pisitools.insinto("/usr/lib/os-prober", "newns")
  24. pisitools.doexe("newns", "/usr/lib/os-prober/")
  25. pisitools.insinto("/usr/share/os-prober", "common.sh")
  26. for d in ("os-probes",
  27. "os-probes/mounted",
  28. "os-probes/init",
  29. "linux-boot-probes",
  30. "linux-boot-probes/mounted"):
  31. pisitools.insinto("/usr/lib/%s" % d, "%s/common/*" % d)
  32. if shelltools.isDirectory("%s/x86" % d):
  33. pisitools.insinto("/usr/lib/%s" % d, "%s/x86/*" % d)
  34. #shelltools.touch("labels")
  35. #pisitools.insinto("/var/lib/os-prober", "labels")
  36. pisitools.dodir("/var/lib/os-prober")