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

_hgproj=fluiddyn
_hgrepo=fluidfft
_hgver="0.2.7"
pkgname=python2-${_hgrepo}-hg
pkgver=0.2.7.r468.5621e335733d
pkgrel=1
pkgdesc="FluidDyn project | FluidFFT | Common API for Fast Fourier Transforms"
arch=('any')
url="https://bitbucket.org/${_hgproj}/${_hgrepo}"
license=('custom:"CeCILL"')
depends=('python2' 'python2-fluiddyn' 'python2-pyfftw')
optdepends=('fftw-mpi: parallelized FFT'
            'openmpi: parallelized FFT'
            'python2-mpi4py: parallelized FFT'
            'python2-pythran: optimized operators'
           )
makedepends=('cython2' 'mercurial' 'python2-setuptools' 'python2-mako')
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
}