actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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. suffix = "32" if get.buildTYPE() == "emul32" else ""
  11. bindir = "/tmp" if get.buildTYPE() == "emul32" else "/bin"
  12. def setup():
  13. autotools.rawConfigure("--libdir=/lib%s \
  14. --sysconfdir=/etc \
  15. --disable-static \
  16. --mandir=/usr/share/man \
  17. --libexecdir=/lib%s \
  18. --bindir=%s" % (suffix, suffix, bindir))
  19. def build():
  20. autotools.make()
  21. def install():
  22. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  23. if get.buildTYPE() == "emul32":
  24. shelltools.copytree("%s/lib32/pkgconfig" % get.installDIR(), "%s/usr/lib32/pkgconfig" % get.installDIR())
  25. pisitools.removeDir("/tmp")
  26. pisitools.removeDir("/lib32/pkgconfig")
  27. return
  28. shelltools.copytree("%s/lib/pkgconfig" % get.installDIR(), "%s/usr/lib/pkgconfig" % get.installDIR())
  29. pisitools.removeDir("/lib/pkgconfig")