actions.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. from pisi.actionsapi import get
  10. Libdir = "/usr/lib32" if get.buildTYPE() == "emul32" else "/usr/lib"
  11. def setup():
  12. options = "--sysconfdir=/etc \
  13. --with-zlib \
  14. --with-pkgconfigdir=/%s/pkgconfig \
  15. --with-noarch-pkgconfigdir=/%s/pkgconfig \
  16. --with-xz" % (Libdir, Libdir)
  17. if get.buildTYPE() == "emul32":
  18. options += " --bindir=/usr/emul32 \
  19. --with-rootlibdir=/lib32 \
  20. --libdir=/usr/lib32"
  21. if get.buildTYPE() != "emul32":
  22. options += " --with-zstd --with-rootlibdir=/lib"
  23. autotools.configure(options)
  24. def build():
  25. autotools.make()
  26. # need git for check
  27. #def check():
  28. # autotools.make("check")
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. if get.buildTYPE() == "emul32":
  32. pisitools.removeDir("/usr/emul32")
  33. return
  34. pisitools.dosym("modprobe.d.5.gz","/usr/share/man/man5/modprobe.conf.5.gz")
  35. for sym in ["modinfo","insmod","rmmod","depmod","modprobe"]:
  36. pisitools.dosym("/usr/bin/kmod","/sbin/%s" % sym)
  37. pisitools.dosym("/usr/bin/kmod","/bin/lsmod")
  38. pisitools.makedirs("%s/etc/depmod.d" % get.installDIR())
  39. pisitools.makedirs("%s/etc/modprobe.d" % get.installDIR())
  40. pisitools.dodoc("NEWS", "README*", "COPYING")