summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f8a1536c935def40156867cdb2348b029cdcdd4 (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
48
49
50
51
52
53
54
55
pkgname=('med' 'med-docs')
pkgver=4.0.0
pkgrel=7
pkgdesc="Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - code-aster exchange module linked to hdf5. Without openmpi."
url="https://www.salome-platform.org/downloads"
license=('LGPL')
depends=('hdf5' 'tk' 'python')
makedepends=('gcc-fortran' 'swig' 'cmake')
optdepends=()
arch=('x86_64')
source=("http://files.salome-platform.org/Salome/other/${pkgname}-${pkgver}.tar.gz"
    "https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch"
    "pycompile.patch")
sha256sums=('a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004'
    '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206'
    'fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300')

prepare() {
    cd ${pkgbase}-${pkgver}
    patch -p1 -i "$srcdir/hdf5-1.12.patch"
    patch -p1 -i "$srcdir/pycompile.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
      -DMEDFILE_BUILD_PYTHON=ON -DMEDFILE_BUILD_TESTS=OFF .
  make
}

# I got 37 tests failed out of 91…
#check() {
    #cd "$pkgname-$pkgver"
    #make test
#}

package_med() {
  cd ${pkgbase}-${pkgver}
  make DESTDIR=${pkgdir} install

  rm -rf $pkgdir/usr/share/doc
}

package_med-docs() {
  arch=('any')
  depends=()

  cd ${pkgbase}-${pkgver}
  make DESTDIR=${pkgdir} install

  rm -rf $pkgdir/usr/share/cmake
  rm -rf $pkgdir/usr/lib
  rm -rf $pkgdir/usr/include
  rm -rf $pkgdir/usr/bin
}