actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233
  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/copyleft/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. autotools.configure("--disable-static\
  12. --sbindir=/sbin \
  13. --libdir=/lib \
  14. --disable-rpath \
  15. --enable-python \
  16. PYTHON={} \
  17. --with-python".format(
  18. "/usr/bin/python2.7" if get.buildTYPE()=="rebuild_python" else "/usr/bin/python3.7"))
  19. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  20. def build():
  21. autotools.make()
  22. def install():
  23. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  24. inarytools.domove("/lib/pkgconfig/*", "/usr/lib/pkgconfig/")
  25. shelltools.unlinkDir("{}/lib/pkgconfig/".format(get.installDIR()))
  26. inarytools.dodoc("ABOUT-NLS", "AUTHORS", "ChangeLog", "COPYING*",
  27. "FAQ", "README*", "NEWS", "TODO")