summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24d6cfd0d00f70c2cc6fd47e3aaa2443191ffb88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Joey Dumont <joey.dumont@gmail.com>
# Contributor: Martin Ortbauer <mortbauer@gmail.com>
# Original: Michele Mocciola <mickele>
# Contributor: Brice Méalier <mealier_brice@yahoo.fr>
# Modified by: César Vecchio <cesar UNDERSTRIKE vecchio AT yahoo DOT com>

pkgname=med-openmpi
pkgver=3.1.0
pkgrel=1
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)
md5sums=('a1e1eb068f20634f5ea797914241eb51'
         '156ab9456bab7b70237d0fc785b97e7c')

prepare() {
  cd ${srcdir}/${pkgname//-openmpi/}-${pkgver}_SRC || return 1
  patch -Np1 -i ../h5public_extract.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}
}