archrelease: copy trunk to community-any
[arch-community.git] / haskell-tzdata / trunk / PKGBUILD
blobb3e63e7e07a14b2cdfde1ad0ca705d1b48431937
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=tzdata
4 pkgname=haskell-tzdata
5 pkgver=0.2.20230322.0
6 pkgrel=2
7 pkgdesc="Haskell package that distributes the standard time zone database"
8 url="https://github.com/ysangkok/haskell-tzdata"
9 license=('Apache')
10 arch=('x86_64')
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')
16 build() {
17     cd $_hkgname-$pkgver
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
29 check() {
30     cd $_hkgname-$pkgver
31     # https://github.com/ysangkok/haskell-tzdata/issues/3
32     runhaskell Setup test --show-details=direct || echo "Tests failed"
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     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE