actions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. options += " --libdir=/usr/lib32 \
  18. --bindir=/_emul32/bin \
  19. --sbindir=/_emul32/sbin"
  20. shelltools.export("CC", "%s -m32" % get.CC())
  21. shelltools.export("CXX", "%s -m32" % get.CXX())
  22. autotools.configure(options)
  23. pisitools.dosed("config/mh-linux", "-nodefaultlibs -nostdlib")
  24. def build():
  25. autotools.make()
  26. def check():
  27. autotools.make("check")
  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. return
  36. pisitools.dohtml("../*.html")