archrelease: copy trunk to community-any
[ArchLinux/community.git] / pnetcdf-openmpi / trunk / PKGBUILD
blobb27ad8161c2c8f92452c1def39722dfbb0ab69fd
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 _pkg=pnetcdf
4 _mpi=openmpi
5 pkgname=${_pkg}-${_mpi}
6 pkgver=1.12.3
7 pkgrel=3
8 pkgdesc="Parallel I/O Library for NetCDF File Access (${_mpi} version)"
9 arch=(x86_64)
10 url="https://parallel-netcdf.github.io/"
11 license=(custom)
12 depends=("${_mpi}" "netcdf-${_mpi}")
13 makedepends=(gcc-fortran)
14 checkdepends=(inetutils)
15 provides=(parallel-netcdf parallel-netcdf-openmpi)
16 conflicts=(parallel-netcdf parallel-netcdf-openmpi)
17 replaces=(parallel-netcdf parallel-netcdf-openmpi)
18 options=(staticlibs)
19 source=("${url}/Release/${_pkg}-${pkgver}.tar.gz")
20 sha256sums=('439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77')
22 prepare() {
23   cd ${_pkg}-${pkgver}
24   autoreconf -vfi
27 build() {
28   cd ${_pkg}-${pkgver}
29   export CFLAGS+=" -ffat-lto-objects"
30   ./configure --prefix=/usr --enable-shared --enable-netcdf4
31   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
32   make LIBTOOLFLAGS=--verbose
35 check() {
36   cd ${_pkg}-${pkgver}
37   export OMPI_MCA_opal_warn_on_missing_libcuda=0
38   make check
39   make ptest
42 package() {
43   cd ${_pkg}-${pkgver}
44   make DESTDIR="${pkgdir}" install
45   install -Dm644 COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${_pkg}