actions.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 get
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. shelltools.export("CFLAGS", "%s -flto-partition=none" % get.CFLAGS())
  12. options = "--disable-aload"
  13. if get.buildTYPE() == "emul32":
  14. options += " --disable-python \
  15. --libdir=/usr/lib32"
  16. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  17. autotools.autoreconf("-fiv")
  18. autotools.configure(options)
  19. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  20. # rpath fix
  21. pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"")
  22. pisitools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE")
  23. def build():
  24. autotools.make()
  25. def install():
  26. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  27. if get.buildTYPE() == "emul32":
  28. pisitools.insinto("/usr/share/alsa", "alsa-ucm-conf-1.2.12/ucm2")
  29. pisitools.insinto("/usr/share/doc/alsa-ucm-conf", "alsa-ucm-conf-1.2.12/LICENSE")
  30. pisitools.insinto("/usr/share/alsa", "alsa-topology-conf-1.2.5.1/topology")
  31. pisitools.insinto("/usr/share/doc/alsa-topology-conf", "alsa-topology-conf-1.2.5.1/LICENSE")
  32. return
  33. pisitools.dodoc("ChangeLog", "TODO", "COPYING", "doc/*.txt")