actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. -DEXAMPLES=OFF"
  16. if get.buildTYPE() == "emul32":
  17. options += " -DCMAKE_INSTALL_PREFIX=/emul32 \
  18. -DLIB_SUFFIX=32"
  19. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  20. cmaketools.configure(options)
  21. def build():
  22. cmaketools.make()
  23. def install():
  24. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  25. # is there any "libdir" prefix for cmake ?
  26. if get.buildTYPE() == "emul32":
  27. from distutils.dir_util import copy_tree
  28. copy_tree("%s/emul32/lib32/" % get.installDIR(), "%s/usr/lib32" % get.installDIR())
  29. pisitools.removeDir("/emul32")
  30. pisitools.dosed("%s/usr/lib32/pkgconfig/openal.pc" % get.installDIR(), "emul32", "usr")
  31. return
  32. pisitools.dodoc("COPYING", "alsoftrc.sample")