actions.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. #shelltools.export("OMPI_ALLOW_RUN_AS_ROOT", "1")
  11. shelltools.export("PKG_CONFIG_PATH", "/usr/lib/openmpi/pkgconfig")
  12. def setup():
  13. autotools.autoreconf("-vif")
  14. shelltools.export("LDFLAGS", "-L/usr/lib/openmpi")
  15. autotools.configure("--enable-mpi --enable-icb")
  16. # fix unused direct dependency analysis
  17. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  18. def build():
  19. autotools.make("F77='mpif77' \
  20. CFLAGS+=' `pkg-config --cflags ompi-f77` ' \
  21. LIBS+=' `pkg-config --libs ompi-f77`' ")
  22. # run as root failure
  23. #def check():
  24. # autotools.make("check")
  25. def install():
  26. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  27. pisitools.dodoc("COPYING", "README*")