archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-dlist / trunk / PKGBUILD
blobbe3fbdab68bf5f961ffc763580fafe066f1b4204
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
3 # Contributor: Don Stewart <dons@galois.com>
4 # Contributor: Lex Black <autumn-wind at web dot de>
6 _hkgname=dlist
7 pkgname=haskell-dlist
8 pkgver=1.0
9 pkgrel=208
10 pkgdesc="Differences lists"
11 url="https://hackage.haskell.org/package/dlist"
12 license=('BSD')
13 arch=('x86_64')
14 depends=('ghc-libs')
15 makedepends=('ghc')
16 checkdepends=('haskell-quickcheck')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('8985b9e775e8d99c3d8cf59eabfb7ed13c395482186b086831a79afea9b980ee59e386856df82dcc030f430be55cc95fa057e962776fe37a371e8be5ae19abef')
20 build() {
21     cd $_hkgname-$pkgver
23     if (( CHECKFUNC )); then
24         _opts=('--enable-tests')
25     else
26         _opts=('--disable-tests')
27     fi
28     
29     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
30         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
31         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
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.md -t "$pkgdir"/usr/share/licenses/$pkgname/
51     rm -f "$pkgdir"/usr/share/doc/$pkgname/license.md