archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-rerebase / trunk / PKGBUILD
blobc3ad0fd187e1ddce67d1d66b454760cc1eb931fa
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=rerebase
5 pkgname=haskell-rerebase
6 pkgver=1.18
7 pkgrel=2
8 pkgdesc='Reexports from "base" with a bunch of other standard libraries'
9 url="https://github.com/nikita-volkov/rerebase"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-rebase')
13 makedepends=('ghc' 'uusi')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('697f83875b7c9b8bcf30d3976b5b7f5cfb3feda3afcbc3916340b841c775ee94820a5b88c6831d083a310905f8db071b5e0e7e58986697e383b1e80f00a5cae3')
17 prepare() {
18     cd $_hkgname-$pkgver
19     gen-setup
22 build() {
23     cd $_hkgname-$pkgver
25     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
27         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
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
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