actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. # Remove -Wall from default flags. The makefiles enable enough warnings
  12. # themselves, and they use -Werror.
  13. options ='-disable-nls --program-prefix=\"eu-\" --with-zlib'
  14. if get.buildTYPE() == "emul32":
  15. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  16. elif get.ARCH() == "x86_64":
  17. pisitools.flags.add("-fexceptions")
  18. autotools.autoreconf("-vfi")
  19. pisitools.cflags.remove("-Wall")
  20. options +=" \
  21. --enable-dwz \
  22. --enable-thread-safety \
  23. --with-bzlib \
  24. --with-lzma"
  25. autotools.configure(options)
  26. def build():
  27. autotools.make()
  28. #def check():
  29. #autotools.make("check")
  30. def install():
  31. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  32. if get.buildTYPE() == "emul32":
  33. pisitools.remove("/usr/lib32/libelf.a")
  34. pisitools.remove("/usr/lib32/libasm.a")
  35. pisitools.remove("/usr/lib32/libdw.a")
  36. elif get.ARCH() == "x86_64":
  37. # Don't remove all the static libs as libebl.a is needed by other packages
  38. pisitools.remove("/usr/lib/libelf.a")
  39. pisitools.remove("/usr/lib/libasm.a")
  40. pisitools.remove("/usr/lib/libdw.a")
  41. pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "NOTES", "README", "THANKS", "TODO")