actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.export("CFLAGS", "%s -D_FILE_OFFSET_BITS=64" % get.CFLAGS())
  12. pisitools.dosed("libspeex/Makefile.am", "noinst_PROGRAMS", "check_PROGRAMS")
  13. options = "--enable-ogg \
  14. --enable-sse \
  15. --disable-static"
  16. if get.buildTYPE() == "emul32":
  17. # ogg only affects the executables so it's safe to disable for emul32
  18. options += " --libdir=/usr/lib32 --disable-ogg"
  19. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  20. autotools.autoreconf("-vif")
  21. autotools.configure(options)
  22. # Remove rpath from speexenc and speexdec
  23. pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"")
  24. pisitools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE")
  25. def build():
  26. autotools.make()
  27. def install():
  28. autotools.rawInstall("DESTDIR=%s docdir=/usr/share/doc/speex" % get.installDIR())
  29. pisitools.dodoc("README")