archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-integer-logarithms / trunk / PKGBUILD
blob187a5fc8286ca25fad59d5c570e14f119967e45f
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=integer-logarithms
4 pkgname=haskell-integer-logarithms 
5 pkgver=1.0.3.1
6 pkgrel=6
7 pkgdesc="Integer logarithms"
8 url="https://github.com/Bodigrim/integer-logarithms"
9 license=('MIT')
10 arch=('x86_64')
11 depends=('ghc-libs')
12 makedepends=('ghc' 'uusi')
13 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
14 sha512sums=('670aff419de8d6afd1b7e1a40b68290bcf7aefad788c3b08aebfa5ca3e709f5d22543fce82fb75dc18b3ba0ef6d8a8f61735cde647a7a6c9392a60ec365534b3')
16 prepare() {
17     cd $_hkgname-$pkgver
18     uusi -u ghc-bignum $_hkgname.cabal
21 build() {
22     cd $_hkgname-$pkgver
23     
24     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
25         --prefix=/usr --docdir=/usr/share/doc/$pkgname \
26         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
27             -finteger-gmp -f-check-bounds
28     runhaskell Setup build $MAKEFLAGS
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 package() {
36     cd $_hkgname-$pkgver
37     
38     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
39     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
40     runhaskell Setup copy --destdir="$pkgdir"
41     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE