# Maintainer: Joey Dumont # Contributor: Martin Ortbauer # Original: Michele Mocciola # Contributor: Brice Méalier # Modified by: César Vecchio pkgname=med-openmpi pkgver=3.1.0 pkgrel=2 pkgdesc="MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - MED is code-aster exchange module linked to hdf5" url="http://www.code-aster.org/outils/med/" license=("LGPL") depends=('hdf5-openmpi' 'zlib') makedepends=('gcc-fortran' 'coreutils' 'openmpi' 'swig') provides=('med') conflicts=('med') replaces=('med') arch=('i686' 'x86_64') source=("http://files.salome-platform.org/Salome/other/${pkgname//-openmpi/}-${pkgver}.tar.gz" "h5public_extract.patch" "signature_conflict_fix.patch") md5sums=('a1e1eb068f20634f5ea797914241eb51' '156ab9456bab7b70237d0fc785b97e7c' '1e9f5c1ff2ecc08d8179178eebe03882') prepare() { cd ${srcdir}/${pkgname//-openmpi/}-${pkgver}_SRC || return 1 patch -Np1 -i ../h5public_extract.patch patch -Np1 -i ../signature_conflict_fix.patch } build() { cd ${srcdir}/${pkgname//-openmpi/}-${pkgver}_SRC || return 1 PYTHON=/usr/bin/python2 MPIFC=mpif90 ./configure --prefix=/usr --with-swig=swig --datadir=/usr/share/med --with-med_int=int || return 1 make || return 1 } package() { cd ${srcdir}/${pkgname//-openmpi/}-${pkgver}_SRC || return 1 make DESTDIR=${pkgdir} install || return 1 # now move the testprograms to share, we don't want all the stuff in the bindir cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testc ${pkgdir}/usr/share/med/testc cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/testf ${pkgdir}/usr/share/med/ cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/unittests ${pkgdir}/usr/share/med/ cp -dpr --no-preserve=ownership ${pkgdir}/usr/bin/usescases ${pkgdir}/usr/share/med/ rm -r ${pkgdir}/usr/bin/{usescases,unittests,testf,testc} }