1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="Fast XML generation library"
8 url="https://github.com/skogsbaer/xmlgen"
11 depends=('ghc-libs' 'haskell-blaze-builder')
12 makedepends=('ghc' 'git' 'haskell-hunit' 'haskell-quickcheck' 'haskell-hxt')
13 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
14 "git+https://github.com/skogsbaer/xmlgen.git")
15 sha256sums=('926fa98c77525f5046274758fcebd190e86de3f53a4583179e8ce328f25a34d6'
20 sed -i 's/Q.Success _ _ _ ->/Q.Success _ _ _ _ _ _ ->/' test/GeneratorTest.hs
22 # testdata missing from hackage tarball
23 cp ../xmlgen/test/*.xml test/
29 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
30 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
31 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
32 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
35 runhaskell Setup build $MAKEFLAGS
36 runhaskell Setup register --gen-script
37 runhaskell Setup unregister --gen-script
38 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
39 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
44 runhaskell Setup test --show-details=direct
50 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
51 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
52 runhaskell Setup copy --destdir="$pkgdir"
53 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
54 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE