1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="The Haskell Test Framework"
8 url="https://github.com/skogsbaer/HTF/"
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')
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 \
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
37 # https://github.com/skogsbaer/HTF/issues/123
38 runhaskell Setup test --show-details=direct || echo "Tests failed"
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