archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-htf / trunk / PKGBUILD
blob2fd86c35260af2ba40f4df5ed7970e930db4eafd
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=HTF
4 pkgname=haskell-htf
5 pkgver=0.15.0.1
6 pkgrel=15
7 pkgdesc="The Haskell Test Framework"
8 url="https://github.com/skogsbaer/HTF/"
9 license=("LGPL2")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-diff' 'haskell-hunit' 'haskell-quickcheck' 'haskell-aeson'
12          'haskell-base64-bytestring' 'haskell-cpphs' 'haskell-src' 'haskell-lifted-base'
13          'haskell-monad-control' 'haskell-old-time' 'haskell-random' 'haskell-regex-compat'
14          'haskell-vector' 'haskell-xmlgen')
15 makedepends=('ghc' 'haskell-aeson-pretty' 'haskell-temporary' 'haskell-unordered-containers')
16 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
17 sha256sums=('bc16a958bd36b03f673388470eed7fea01daaa1604677bb08dfb910598d39856')
19 build() {
20   cd $_hkgname-$pkgver
22   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
23     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
24     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
25     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
26     --ghc-option='-pie'
28   LD_LIBRARY_PATH="$PWD"/dist/build 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 check() {
36   cd $_hkgname-$pkgver
37   # https://github.com/skogsbaer/HTF/issues/123
38   runhaskell Setup test --show-details=direct || echo "Tests failed"
41 package() {
42   cd $_hkgname-$pkgver
44   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46   runhaskell Setup copy --destdir="$pkgdir"
47   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
48   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE