actions.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 --disable-debuginfod --disable-libdebuginfod'
  14. if get.buildTYPE() == "emul32":
  15. shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
  16. options += " --libdir=/usr/lib32 \
  17. --bindir=/usr/emul32 \
  18. "
  19. elif get.ARCH() == "x86_64":
  20. pisitools.flags.add("-fexceptions")
  21. autotools.autoreconf("-vfi")
  22. pisitools.cflags.remove("-Wall")
  23. options +=" \
  24. --enable-dwz \
  25. --enable-thread-safety \
  26. --with-bzlib \
  27. --with-lzma"
  28. #shelltools.export("LDFLAGS", "-L/lib -lbz2")
  29. autotools.autoreconf("-fiv")
  30. autotools.configure(options)
  31. def build():
  32. autotools.make()
  33. #def check():
  34. #autotools.make("check")
  35. def install():
  36. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  37. if get.buildTYPE() == "emul32":
  38. pisitools.remove("/usr/lib32/libelf.a")
  39. pisitools.remove("/usr/lib32/libasm.a")
  40. pisitools.remove("/usr/lib32/libdw.a")
  41. pisitools.removeDir("/usr/emul32")
  42. elif get.ARCH() == "x86_64":
  43. # Don't remove all the static libs as libebl.a is needed by other packages
  44. pisitools.remove("/usr/lib/libelf.a")
  45. pisitools.remove("/usr/lib/libasm.a")
  46. pisitools.remove("/usr/lib/libdw.a")
  47. pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "NOTES", "README", "THANKS", "TODO")