actions.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python3
  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 inary.actionsapi import autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. def setup():
  11. shelltools.export("AUTOPOINT", "true")
  12. autotools.configure("PYTHON={} \
  13. --with-python \
  14. --without-ldap \
  15. --without-sasl \
  16. --with-popt \
  17. --disable-rpath \
  18. --enable-gtk-doc-html=no \
  19. --disable-gtk-doc".format(
  20. "python2" if get.buildTYPE()=="rebuild_python" else "python3"))
  21. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  22. shelltools.system("sed -i 's/SUBDIRS = po docs/SUBDIRS = po/' Makefile")
  23. def build():
  24. autotools.make()
  25. autotools.make("-C po update-gmo")
  26. def install():
  27. if get.buildTYPE()=="rebuild_python":
  28. autotools.rawInstall("DESTDIR='%s/python2'" % get.installDIR())
  29. shelltools.move("%s/python2/usr/lib/python2.7" % get.installDIR(),
  30. "%s/usr/lib/python2.7" % get.installDIR())
  31. shelltools.unlinkDir("%s/python2" % get.installDIR())
  32. return
  33. autotools.rawInstall("DESTDIR='%s'" % get.installDIR())
  34. inarytools.dodoc("ABOUT*", "AUTHORS", "COPYING", "NEWS", "README")