actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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("R_HOME_DIR", "/usr/lib/R")
  12. shelltools.export("BLAS_LIBS","/usr/lib")
  13. shelltools.export("LAPACK_LIBS","-L/usr/lib -llapack -lblas")
  14. autotools.aclocal("-I m4")
  15. autotools.autoconf()
  16. autotools.configure("--prefix=/usr \
  17. --libdir=/usr/lib \
  18. --sysconfdir=/etc/R \
  19. --datarootdir=/usr/share \
  20. --with-recommended-packages \
  21. --enable-R-profiling \
  22. --enable-R-shlib \
  23. --enable-shared \
  24. --enable-prebuilt-html \
  25. --disable-openmp \
  26. --with-blas=-lblas \
  27. --with-lapack \
  28. --without-tcltk \
  29. --with-readline \
  30. rsharedir=/usr/share/R/ \
  31. rdocdir=/usr/share/doc/R \
  32. rincludedir=/usr/include/R \
  33. --with-x")
  34. def build():
  35. shelltools.export("R_HOME","")
  36. autotools.make()
  37. # build math library
  38. shelltools.cd("src/nmath/standalone")
  39. autotools.make("shared")
  40. #def check():
  41. #shelltools.export("R_HOME","")
  42. #autotools.make("check")
  43. def install():
  44. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  45. # install math library remove static libs
  46. autotools.rawInstall("-C src/nmath/standalone DESTDIR=%s" % get.installDIR())
  47. pisitools.rename("/usr/lib/libRmath.so","libRmath.so.0.0.0")
  48. pisitools.dosym("/usr/lib/libRmath.so.0.0.0","/usr/lib/libRmath.so.0")
  49. pisitools.dosym("/usr/lib/libRmath.so.0.0.0","/usr/lib/libRmath.so")