build.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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 inarytools
  7. from inary.actionsapi import shelltools
  8. from inary.actionsapi import autotools as tools
  9. from inary.actionsapi import get
  10. # Common X11 library build actions.py file
  11. def setup():
  12. if get.buildTYPE() == "emul32":
  13. shelltools.export("CC","gcc -m32")
  14. shelltools.export("CXX","g++ -m32")
  15. shelltools.reset_env()
  16. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  17. tools.configure("--libdir=/usr/lib32/X11")
  18. else:
  19. shelltools.reset_env()
  20. tools.configure("--libdir=/usr/lib/X11")
  21. def build():
  22. tools.make()
  23. def install():
  24. tools.rawInstall("DESTDIR=%s" % get.installDIR())
  25. if get.buildTYPE() == "emul32":
  26. if shelltools.isDirectory("{}/usr/lib32/X11/pkgconfig".format(get.installDIR())):
  27. inarytools.domove("/usr/lib32/X11/pkgconfig","/usr/lib32")
  28. else:
  29. if shelltools.isDirectory("{}/usr/lib/X11/pkgconfig".format(get.installDIR())):
  30. inarytools.domove("/usr/lib/X11/pkgconfig","/usr/lib")