summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f03fa9f0b699b80c1287fd6e30058e9eec3a563d (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=fenicsprecice
pkgname=python-${_base}
pkgdesc="FEniCS-preCICE adapter is a preCICE adapter for the open source computing platform FEniCS"
pkgver=1.3.0
pkgrel=1
arch=(any)
url="https://github.com/precice/${_base/precice/-adapter}"
license=(LGPL3)
depends=(python-pyprecice python-dolfin python-scipy)
makedepends=(python-setuptools)
source=(${url}/archive/v${pkgver}.tar.gz)
sha512sums=('d4040c455da6fd08291b7b07da25147c6ad36fc88b76b171c3b40ca4ae8f485736ce78b9d34f369017c024063dc3cbbbb50019bc2bfb9b2bec6623c3bbe87599')

build() {
  if [ -z "$(ldconfig -p | grep libcuda.so.1)" ]; then
    export OMPI_MCA_opal_warn_on_missing_libcuda=0
  fi
  cd ${_base/precice/-adapter}-${pkgver}
  export PYTHONHASHSEED=0
  python setup.py build
}

check() {
  cd ${_base/precice/-adapter}-${pkgver}
  python setup.py test -s tests.unit
  python setup.py test -s tests.integration
}

package() {
  cd ${_base/precice/-adapter}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}