actions.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 get
  10. def setup():
  11. shelltools.export("CPPFLAGS", "-DNDEBUG -fPIC")
  12. shelltools.export("CFLAGS", "-g -Wall -Wconversion")
  13. shelltools.export("FC", "gfortran")
  14. shelltools.export("F90", "gfortran")
  15. shelltools.export("FFLAGS", "-fPIC %s" % get.CFLAGS())
  16. shelltools.export("FCFLAGS", "-fPIC %s" % get.CFLAGS())
  17. shelltools.export("F90FLAGS", "-fPIC %s" % get.CFLAGS())
  18. autotools.configure("--enable-shared \
  19. --enable-netcdf-4 \
  20. --enable-dap-netcdf \
  21. --disable-static \
  22. ")
  23. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  24. def build():
  25. autotools.make()
  26. def check():
  27. autotools.make("-j1 check")
  28. def install():
  29. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  30. #pisitools.dodoc("README")