archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-keys / trunk / PKGBUILD
blobce131bf002adf9352d9e3d8f64bf1ca53296fdcd
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=keys
5 pkgname=haskell-keys
6 pkgver=3.12.3
7 pkgrel=260
8 pkgdesc="Keyed functors and containers"
9 url="https://github.com/ekmett/keys/"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-comonad' 'haskell-free' 'haskell-hashable' 'haskell-semigroupoids'
13          'haskell-tagged' 'haskell-transformers-compat' 'haskell-unordered-containers')
14 makedepends=('ghc' 'uusi')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('e0bab964eb38388dfb2fe7dcb4999da0263a2162f171f7ed629a2e1de33eb1cb99dc37a6fe32045f136466cebb5aed69e533417256877316c81a02abc700c28d')
18 prepare() {
19     cd $_hkgname-$pkgver
20     uusi -d semigroups -u hashable $_hkgname.cabal
23 build() {
24     cd $_hkgname-$pkgver
25     
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
29     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 package() {
37     cd $_hkgname-$pkgver
38     
39     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
40     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
41     runhaskell Setup copy --destdir="$pkgdir"
42     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
43     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE