archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-tz / trunk / PKGBUILD
blobc4c1f95598941bc9a1eafd0addccbbba8193d060
1 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
3 _hkgname=tz
4 pkgname=haskell-tz
5 pkgver=0.1.3.6
6 pkgrel=69
7 pkgdesc='Efficient time zone handling'
8 arch=(x86_64)
9 url='https://github.com/ysangkok/haskell-tz'
10 license=(BSD)
11 depends=(ghc-libs haskell-vector haskell-data-default haskell-tzdata)
12 checkdepends=(haskell-tasty haskell-tasty-th haskell-hunit haskell-quickcheck
13               haskell-tasty-quickcheck haskell-tasty-hunit)
14 makedepends=(ghc uusi)
15 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
16 sha512sums=('d9b7b8964dbaa1bb4d9f805e01d3029313c676743b28c336d17ae98bb984ad8671a1712e9b927588b823ece68805eec8d637f3d8161cb3b63cfc0e609e3c7df3')
18 prepare() {
19   cd $_hkgname-$pkgver
20   uusi -u vector $_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     --enable-tests \
30     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
31     --ghc-option='-pie'
33   runhaskell Setup build $MAKEFLAGS
34   runhaskell Setup register --gen-script
35   runhaskell Setup unregister --gen-script
36   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
37   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
40 check() {
41   cd $_hkgname-$pkgver
42   runhaskell Setup test --show-details=direct
45 package() {
46   cd $_hkgname-$pkgver
48   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
49   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
50   runhaskell Setup copy --destdir="$pkgdir"
51   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
52   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
55 # vim: ts=2 sw=2 et: