1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="Haskell package that distributes the standard time zone database"
8 url="https://github.com/ysangkok/haskell-tzdata"
11 depends=('ghc-libs' 'haskell-vector')
12 makedepends=('ghc' 'haskell-hunit' 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-th')
13 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
14 sha512sums=('30b4de1bf84ad10ccaf71e6b5a296ff03a83478ba3110389a5f4c15770a77d13d2a2b09f22d71d8bac033418a995bb115f4dc2af2d3baccf32d29c36b71b2257')
19 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
20 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
21 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
22 runhaskell Setup build $MAKEFLAGS
23 runhaskell Setup register --gen-script
24 runhaskell Setup unregister --gen-script
25 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
26 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
31 # https://github.com/ysangkok/haskell-tzdata/issues/3
32 runhaskell Setup test --show-details=direct || echo "Tests failed"
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 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE