Advertisement
Guest User

mpich-3.0 PKGBUILD

a guest
Nov 1st, 2015
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.69 KB | None | 0 0
  1. # Maintainer: George Eleftheriou <eleftg>
  2. # Contributor: Jed Brown <jed@59A2.org>
  3.  
  4. pkgname=mpich
  5. pkgver=3.0
  6. pkgrel=4
  7. pkgdesc="An improved implementation of the Message Passing Interface."
  8. url="https://mpich.org"
  9. arch=("any")
  10. license=("custom")
  11. depends=('python2' 'gcc-fortran' 'libxml2' 'openssh' 'numactl' 'pciutils')
  12. makedepends=('texlive-core' 'sowing')
  13. optdepends=("java-environment")
  14. install="${pkgname}.install"
  15. source=("http://www.mpich.org/static/downloads/${pkgver}/${pkgname}-${pkgver}.tar.gz"
  16.         "mpich.profile")
  17. sha256sums=('3aa763585a589393319e8b4f19e46010d5b5e7c5935657027671fff4d1c7d349'
  18.             'b9716441a544511bf88618edeb40c3eb80f1b5d0d9369c30d750251feed02284')
  19. options=('!libtool')
  20.  
  21.  
  22. build() {
  23.   cd ${srcdir}/${pkgname}-${pkgver}
  24.  
  25.   # CFLAGS etc are normally written into the wrapper compilers.  This
  26.   # gives surprising results, e.g. when the user wants to compile their
  27.   # program without optimization.
  28.   export MPICHLIB_CFLAGS="${CFLAGS}";      unset CFLAGS
  29.   export MPICHLIB_CXXFLAGS="${CXXFLAGS}";  unset CXXFLAGS
  30.   export MPICHLIB_CPPFLAGS="${CPPFLAGS}";  unset CPPFLAGS
  31.   export MPICHLIB_FFLAGS="${FFLAGS}";      unset FFLAGS
  32.   export MPICHLIB_F90FLAGS="${F90FLAGS}";  unset F90FLAGS
  33.   export MPICHLIB_LDFLAGS="${LDFLAGS}";    unset LDFLAGS
  34.  
  35.   mkdir -p build
  36.   cd build
  37.  
  38.   ../configure --prefix=/opt/mpich --enable-shared --enable-sharedlibs=gcc \
  39.     --enable-error-checking=runtime --enable-error-messages=all \
  40.     --enable-timer-type=clock_gettime \
  41.     --with-python=python2
  42.  
  43.   make
  44.   make mandoc
  45. }
  46.  
  47. check() {
  48.   cd ${srcdir}/${pkgname}-${pkgver}/build
  49.  
  50.   # CFLAGS etc are normally written into the wrapper compilers.  This
  51.   # gives surprising results, e.g. when the user wants to compile their
  52.   # program without optimization.
  53.   export MPICHLIB_CFLAGS=${CFLAGS};      unset CFLAGS
  54.   export MPICHLIB_CXXFLAGS=${CXXFLAGS};  unset CXXFLAGS
  55.   export MPICHLIB_CPPFLAGS=${CPPFLAGS};  unset CPPFLAGS
  56.   export MPICHLIB_FFLAGS=${FFLAGS};      unset FFLAGS
  57.   export MPICHLIB_F90FLAGS=${F90FLAGS};  unset F90FLAGS
  58.   export MPICHLIB_LDFLAGS=${LDFLAGS};    unset LDFLAGS
  59.  
  60.   make check
  61. }
  62.  
  63. package() {
  64.   cd "${srcdir}/${pkgname}-${pkgver}/build"
  65.   make DESTDIR="${pkgdir}" install
  66.  
  67.   ln -sf mpiexec.hydra "${pkgdir}/opt/mpich/bin/mpiexec"
  68.   ln -sf mpiexec "${pkgdir}/opt/mpich/bin/mpirun"
  69.   ln -sf mpiexec.hydra "${pkgdir}/opt/mpich/bin/mpirun.hydra"
  70.  
  71.   install -D -m644 "${srcdir}/${pkgname}-${pkgver}/COPYRIGHT" "${pkgdir}/usr/share/licenses/mpich/license.txt"
  72.   install -D -m755 "${srcdir}/${pkgname}.profile" "${pkgdir}/etc/profile.d/mpich.sh"
  73.  
  74.   mkdir -p "${pkgdir}/etc/ld.so.conf.d"
  75.   echo /opt/mpich/lib > "${pkgdir}/etc/ld.so.conf.d/mpich.conf"
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement