actions.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/python
  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 pisi.actionsapi import cmaketools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. #WorkDir = "openal-soft-%s" % get.srcVERSION()
  11. def setup():
  12. options = "-DALSA=1 \
  13. -DPULSEAUDIO=1 \
  14. -DOSS=1 \
  15. -DCMAKE_INSTALL_PREFIX=/usr \
  16. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  17. -DEXAMPLES=OFF \
  18. -DALSOFT_TESTS=OFF"
  19. if get.buildTYPE() == "emul32":
  20. options += " -DCMAKE_INSTALL_PREFIX=/emul32 \
  21. -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
  22. -DALSOFT_NO_QT5=TRUE \
  23. -DLIB_SUFFIX=32 \
  24. -DALSOFT_TESTS=OFF \
  25. -DALSOFT_EXAMPLES=OFF \
  26. -DALSOFT_UTILS=OFF"
  27. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  28. cmaketools.configure(options)
  29. def build():
  30. cmaketools.make()
  31. def install():
  32. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  33. # is there any "libdir" prefix for cmake ?
  34. if get.buildTYPE() == "emul32":
  35. from distutils.dir_util import copy_tree
  36. #copy_tree("%s/emul32/lib32/" % get.installDIR(), "%s/usr/lib32" % get.installDIR())
  37. pisitools.removeDir("/emul32")
  38. pisitools.dosed("%s/usr/lib32/pkgconfig/openal.pc" % get.installDIR(), "emul32", "usr")
  39. pisitools.dosed("%s/usr/lib32/cmake/OpenAL/OpenALConfig.cmake" % get.installDIR(), "emul32", "usr")
  40. return
  41. pisitools.dodoc("COPYING", "alsoftrc.sample", "README*")