actions.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import cmaketools
  8. from pisi.actionsapi import shelltools
  9. def setup():
  10. shelltools.makedirs("build")
  11. shelltools.cd("build")
  12. options = "-DVGL_FAKEXCB=1 \
  13. -DVGL_INCDIR=/usr/include \
  14. -DTJPEG_INCLUDE_DIR=/usr/include \
  15. -DVGL_DOCDIR=/usr/share/doc/%s \
  16. " % get.srcNAME()
  17. if get.buildTYPE() == "emul32":
  18. options += "-DVGL_LIBDIR=/usr/lib32 \
  19. -DCMAKE_INSTALL_PREFIX=/emul32 \
  20. -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
  21. -DVGL_BINDIR=/emul32/bin \
  22. -DTJPEG_LIBRARY=/usr/lib32/libturbojpeg.so \
  23. -DVGL_FAKELIBDIR=/usr/lib32/fakelib \
  24. "
  25. elif get.ARCH() == "x86_64":
  26. options += "-DVGL_LIBDIR=/usr/lib \
  27. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  28. -DCMAKE_INSTALL_PREFIX=/usr \
  29. -DVGL_FAKELIBDIR=/usr/lib/fakelib \
  30. -DTJPEG_LIBRARY=/usr/lib/libturbojpeg.so \
  31. -DVGL_BINDIR=/usr/bin"
  32. cmaketools.configure(options, sourceDir="..")
  33. def build():
  34. shelltools.cd("build")
  35. cmaketools.make()
  36. def install():
  37. shelltools.cd("build")
  38. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  39. if get.buildTYPE() == "emul32":
  40. pisitools.insinto("/usr/bin/","%s/emul32/bin/glxspheres" % get.installDIR(),"glxspheres32")
  41. pisitools.removeDir("/emul32")
  42. elif get.ARCH() == "x86_64":
  43. pisitools.domove("/usr/bin/glxinfo", "/usr/bin/", "vglxinfo")