PKGBUILD 1.68 KB
Newer Older
1
pkgname=openmpi
Luca Giambonini's avatar
Luca Giambonini committed
2
pkgver=3.0.0
3
pkgrel=3
Xuetian Weng's avatar
Xuetian Weng committed
4
pkgdesc='High performance message passing library (MPI)'
Luca Giambonini's avatar
Luca Giambonini committed
5
arch=('x86_64')
Xuetian Weng's avatar
Xuetian Weng committed
6 7
url='http://www.open-mpi.org'
license=(custom)
Luca Giambonini's avatar
Luca Giambonini committed
8
depends=('libtool' 'hwloc' 'openssh')
Luca Giambonini's avatar
Luca Giambonini committed
9
makedepends=('inetutils' 'valgrind' 'gcc-fortran')
Xuetian Weng's avatar
Xuetian Weng committed
10 11
optdepends=('gcc-fortran: fortran support')
options=(staticlibs)
Luca Giambonini's avatar
Luca Giambonini committed
12 13
source=(https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/${pkgname}-${pkgver}.tar.bz2)
sha1sums=('fa63990db1aec88b36335a1d79abf47ac6348e23')
Fabian's avatar
Fabian committed
14 15

build() {
Luca Giambonini's avatar
Luca Giambonini committed
16
   cd $pkgname-$pkgver
Manuel's avatar
Manuel committed
17

18 19
   ./configure --prefix=/usr \
               --sysconfdir=/etc/${pkgname} \
Xuetian Weng's avatar
Xuetian Weng committed
20
               --enable-mpi-fortran=all \
21 22
               --libdir=/usr/lib/${pkgname} \
               --with-threads=posix \
Luca Giambonini's avatar
Luca Giambonini committed
23
               --enable-mpi-thread-multiple \
24
               --enable-smp-locks \
Luca Giambonini's avatar
Luca Giambonini committed
25
               --enable-builtin-atomics \
Luca Giambonini's avatar
Luca Giambonini committed
26
               --enable-mpi-cxx \
27 28 29 30
               --with-valgrind \
               --enable-memchecker \
               --enable-pretty-print-stacktrace \
               --without-slurm \
Manuel's avatar
Manuel committed
31
               --with-hwloc=/usr \
Msnuel's avatar
Msnuel committed
32
               --with-libltdl=/usr  \
33 34 35 36 37 38
               FC=/usr/bin/gfortran \
               LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"

   make
}

Luca Giambonini's avatar
Luca Giambonini committed
39 40 41 42 43 44
check() {
   cd $pkgname-$pkgver

   make check
}

45
package() {
Xuetian Weng's avatar
Xuetian Weng committed
46 47
   cd $pkgname-$pkgver
   make DESTDIR="$pkgdir" install
48

Fabian's avatar
Fabian committed
49

Luca Giambonini's avatar
Luca Giambonini committed
50 51 52 53 54
  # FS#28583
  install -dm 755 "${pkgdir}/usr/lib/pkgconfig"
  for i in ompi-c.pc ompi-cxx.pc ompi-f77.pc ompi-f90.pc ompi.pc; do
    ln -sf "/usr/lib/openmpi/pkgconfig/${i}" "${pkgdir}/usr/lib/pkgconfig/"
  done
55

Luca Giambonini's avatar
Luca Giambonini committed
56 57 58
  install -dm 755 "${pkgdir}/etc/ld.so.conf.d"
  echo "/usr/lib/${pkgname}" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
59
}