1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="Generates a references DB from .hie files"
8 url="https://github.com/wz1000/HieDb"
11 depends=('ghc-libs' 'haskell-algebraic-graphs' 'haskell-ansi-terminal' 'haskell-extra' 'haskell-ghc'
12 'haskell-ghc-paths' 'haskell-hie-compat' 'haskell-lucid' 'haskell-optparse-applicative'
13 'haskell-sqlite-simple' 'haskell-terminal-size')
14 makedepends=('ghc' 'uusi' 'haskell-hspec' 'haskell-temporary')
15 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
16 sha512sums=('77b7b45ed63e72c8e93a7945f76449e3350f3bf4f6e6c5e6e526e44d852c9fcc20019fc0ac734e367722cf212ba99518ee7a1f6fa28decb4f236c93ad3f7dde8')
20 sed -i 's/callProcess hc args/callProcess hc (["-dynamic"] ++ args)/' test/Main.hs
22 # algebraic-graphs 0.7
23 sed -i 's/dfs vs m/dfs m vs/' src/HieDb/Query.hs
25 uusi -u algebraic-graphs $_hkgname.cabal
31 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
32 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
33 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
34 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
37 runhaskell Setup build $MAKEFLAGS
38 runhaskell Setup register --gen-script
39 runhaskell Setup unregister --gen-script
40 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
41 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
46 PATH="$PWD/dist/build/hiedb:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" runhaskell Setup test --show-details=direct
52 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
53 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
54 runhaskell Setup copy --destdir="$pkgdir"
55 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
56 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE