actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 get
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. from inary.actionsapi import pythonmodules
  11. def setup():
  12. if get.buildTYPE()=="rebuild_python":
  13. return
  14. inarytools.flags.add("-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC")
  15. autotools.configure("--datadir=/usr/share/misc \
  16. --disable-static \
  17. --with-python=/usr/bin/python3 \
  18. --enable-fsect-man5")
  19. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  20. def build():
  21. if get.buildTYPE()=="rebuild_python":
  22. return
  23. autotools.make()
  24. def install():
  25. if get.buildTYPE()=="rebuild_python":
  26. shelltools.cd("python")
  27. pythonmodules.install(pyVer="2")
  28. return
  29. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  30. shelltools.cd("python")
  31. pythonmodules.install(pyVer="3")
  32. shelltools.cd("..")
  33. inarytools.dodoc("ChangeLog", "MAINT", "README")