actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright 2015 TUBITAK/UEKAE
  5. # Licensed under the GNU General Public License, version 2.
  6. # See the file http://www.gnu.org/copyleft/gpl.txt.
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. from inary.actionsapi import get
  11. def setup():
  12. libdir = "lib"
  13. if get.buildTYPE() == "emul32":
  14. shelltools.export("CC","gcc -m32")
  15. shelltools.export("CXX","g++ -m32")
  16. shelltools.reset_env()
  17. shelltools.export("LDFLAGS","-m32")
  18. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  19. libdir = "lib32"
  20. autotools.configure("--prefix=/ \
  21. --with-rootprefix=/ \
  22. --includedir=/usr/include \
  23. --libdir=/{} \
  24. --enable-split-usr \
  25. --enable-manpages \
  26. --enable-kmod \
  27. --disable-selinux \
  28. --bindir=/bin".format(libdir))
  29. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  30. def build():
  31. autotools.make()
  32. def install():
  33. autotools.rawInstall("-j1 DESTDIR=%s" % (get.installDIR()))
  34. # emul32 stop here
  35. if get.buildTYPE() == "emul32":
  36. return
  37. else:
  38. # Create /etc/udev/rules.d for backward compatibility
  39. inarytools.dodir("/etc/udev/rules.d")