actions.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. WorkDir="icu/source"
  11. def setup():
  12. autotools.autoconf("-f")
  13. options = "--with-data-packaging=library \
  14. --disable-samples \
  15. --disable-silent-rules"
  16. if get.buildTYPE() == "_emul32":
  17. shelltools.export("CC", "%s -m32" % get.CC())
  18. shelltools.export("CXX", "%s -m32" % get.CXX())
  19. options += " --libdir=/usr/lib32 \
  20. --bindir=/_emul32/bin \
  21. --sbindir=/_emul32/sbin"
  22. autotools.configure(options)
  23. pisitools.dosed("config/mh-linux", "-nodefaultlibs -nostdlib")
  24. def build():
  25. autotools.make()
  26. def check():
  27. autotools.make("-k check || true")
  28. def install():
  29. autotools.rawInstall('-j1 DESTDIR="%s"' % get.installDIR())
  30. if get.buildTYPE() == "_emul32":
  31. pisitools.domove("/_emul32/bin/icu-config", "/usr/bin", "icu-config-32")
  32. pisitools.removeDir("/_emul32")
  33. for f in shelltools.ls("%s/usr/lib32/pkgconfig" % get.installDIR()):
  34. pisitools.dosed("%s/usr/lib32/pkgconfig/%s" % (get.installDIR(), f), "_emul32", "usr")
  35. pisitools.dosed("%s/usr/lib32/icu/%s/Makefile.inc" % ( get.installDIR(), get.srcVERSION()), "_emul32", "usr")
  36. pisitools.dosed("%s/usr/bin/icu-config-32" % get.installDIR(), "_emul32", "usr")
  37. return
  38. pisitools.dohtml("../*.html")