summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f3d7b1166a3897da83efac2d78c755eaf3a5e68 (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: Ashwin <ashuwish+arch@gmail.com>

_hgproj=fluiddyn
_hgrepo=fluidsim
_hgver="4c8d09d"
pkgname=python2-fluidsim-hg
pkgver=0.2.2.r901.4c8d09d98df4
pkgrel=2
pkgdesc="FluidDyn project | FluidSim | Simulation package for CFD."
arch=('any')
url="https://foss.heptapod.net/${_hgproj}/${_hgrepo}"
license=('custom:"CeCILL"')
depends=('python2' 'python2-fluiddyn' 'python2-fluidfft')
optdepends=('fftw-mpi: parallelized solvers'
            'openmpi: parallelized solvers'
            'python2-mpi4py: parallelized solvers')
makedepends=('cython2' 'mercurial' 'python2-setuptools')
provides=(python2-${_hgrepo})

source=("hg+${url}")
sha256sums=('SKIP')

prepare() {
  cd "${srcdir}/${_hgrepo}"
  hg update ${_hgver}
}

pkgver() {
  cd "${srcdir}/${_hgrepo}"
  echo $(hg parents --template '{word(-1,latesttag,":")}').r$(hg identify -n).$(hg identify -i)
}

build() {
  cd "${srcdir}/${_hgrepo}"
  python2 setup.py build
}

# check() {
#   cd "${srcdir}/${_hgrepo}"
#   python2 -m unittest discover
# }

package() {
  cd "${srcdir}/${_hgrepo}"
  python2 setup.py install --root=$pkgdir --optimize 1
  install -D -m644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}