upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-math-functions / trunk / PKGBUILD
blob54840f139d8760ea8a2970a29e72ee9cb1cfd79b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=math-functions
5 pkgname=haskell-math-functions
6 pkgver=0.3.4.2
7 pkgrel=242
8 pkgdesc="Special functions and Chebyshev polynomials"
9 url="https://github.com/bos/math-functions"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-data-default-class' "haskell-primitive" "haskell-vector")
13 makedepends=('ghc')
14 checkdepends=('haskell-erf' 'haskell-quickcheck' 'haskell-tasty' 'haskell-tasty-hunit'
15               'haskell-tasty-quickcheck' 'haskell-vector-th-unbox')
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('cb29901294463edbba37e97445bb9ed039bdc43815c9bbd9b9bb92b87393e6e891f5840d337c6c06c7e30d26107d32a59c39ac51436be43dba00d0e2411a9053')
19 build() {
20     cd $_hkgname-$pkgver
22     if (( CHECKFUNC )); then
23         _opts=('--enable-tests')
24     else
25         _opts=('--disable-tests')
26     fi
27    
28     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
30         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31             -f-system-expm1
32     runhaskell Setup build $MAKEFLAGS
33     runhaskell Setup register --gen-script
34     runhaskell Setup unregister --gen-script
35     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
36     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
39 check() {
40     cd $_hkgname-$pkgver
41     runhaskell Setup test --show-details=direct
44 package() {
45     cd $_hkgname-$pkgver
46     
47     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
48     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
49     runhaskell Setup copy --destdir="$pkgdir"
50     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
51     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE