actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright 2010 TUBITAK/BILGEM
  5. # Licensed under the GNU General Public License, version 2.
  6. # See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import mesontools
  11. from pisi.actionsapi import get
  12. Libdir = "/usr/lib32" if get.buildTYPE() == "emul32" else "/usr/lib"
  13. bindir = "/usr/bin32" if get.buildTYPE() == "emul32" else "/usr/bin"
  14. def setup():
  15. options = "-Ddocumentation=false \
  16. --libdir=%s \
  17. --bindir=%s \
  18. " % (Libdir, bindir)
  19. if get.buildTYPE() == "emul32":
  20. options += " -Ddocumentation=false \
  21. "
  22. mesontools.configure(options)
  23. def build():
  24. mesontools.build()
  25. def install():
  26. mesontools.install()
  27. if get.buildTYPE() == "emul32":
  28. pisitools.removeDir("/usr/bin32")
  29. for f in shelltools.ls("%s/usr/lib32/pkgconfig" % get.installDIR()):
  30. pisitools.dosed("%s/usr/lib32/pkgconfig/%s" % (get.installDIR(), f), "bin32", "bin")
  31. pisitools.insinto("/usr/share/pixmaps/icons", "doc/publican/sources/images/wayland.png")
  32. return
  33. pisitools.dodoc("COPYING", "CONTRIBUTING*", "README*")