actions.py 1.8 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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import cmaketools
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.makedirs("build")
  13. shelltools.cd("build")
  14. cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  15. -DBUILD_SHARED_LIBS=ON \
  16. -DCMAKE_BUILD_TYPE=Release \
  17. -DHDF5_BUILD_HL_LIB=ON \
  18. -DHDF5_BUILD_CPP_LIB=ON \
  19. -DHDF5_BUILD_FORTRAN=ON", sourceDir="..")
  20. shelltools.cd("..")
  21. autotools.configure("--prefix=/usr \
  22. --enable-cxx \
  23. --enable-hl \
  24. --enable-threadsafe \
  25. --enable-fortran \
  26. --enable-build-mode=production \
  27. --enable-linux-lfs \
  28. --enable-unsupported \
  29. --disable-static \
  30. --disable-parallel \
  31. --disable-sharedlib-rpath \
  32. --disable-dependency-tracking \
  33. --docdir=/usr/share/doc/hdf5/ \
  34. --with-pic")
  35. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  36. def build():
  37. autotools.make()
  38. def install():
  39. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  40. pisitools.insinto("/usr/lib/pkgconfig", "build/CMakeFiles/*.pc")
  41. pisitools.dodoc("ACKNOWLEDGMENTS", "COPYING", "README*", "release_docs/HISTORY-*", "release_docs/RELEASE.txt")