actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env 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 pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import cmaketools
  10. def setup():
  11. shelltools.makedirs("build")
  12. shelltools.cd("build")
  13. cmaketools.configure("-DKLU_ENABLE=ON \
  14. -DMPI_ENABLE=ON \
  15. -DOPENMP_ENABLE=ON \
  16. -DPTHREAD_ENABLE=ON \
  17. -DF77_INTERFACE_ENABLE=ON \
  18. -DCMAKE_INSTALL_LIBDIR=lib \
  19. -DKLU_LIBRARY_DIR=/usr/lib \
  20. -DCMAKE_INSTALL_PREFIX=/usr \
  21. -DCMAKE_C_FLAGS='-fPIC -fcommon' \
  22. -DEXAMPLES_INSTALL_PATH=/usr/share/sundials/examples", sourceDir="..")
  23. def build():
  24. shelltools.cd("build")
  25. cmaketools.make()
  26. def install():
  27. shelltools.cd("build")
  28. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  29. shelltools.cd("..")
  30. pisitools.dodoc("LICENSE", "NOTICE", "README*")