1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=haskell-graphviz
8 pkgdesc="Bindings to Graphviz for graph visualisation."
9 url="https://hackage.haskell.org/package/${_hkgname}"
12 depends=('ghc-libs' 'haskell-colour' 'haskell-dlist' 'haskell-fgl' 'haskell-polyparse'
13 'haskell-temporary' 'haskell-wl-pprint-text')
14 makedepends=('ghc' 'uusi')
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/ivan-m/graphviz/archive/$pkgver.tar.gz")
16 sha512sums=('9cd166f04565f9da56b93c6da49cc9f515a37762dd780e3868cf41c8d2b7709f627f0b60ecc31ce77249e38a53c74d1a989a9bfbf419f370cedf0c67526a9e7b')
20 uusi -u fgl $_hkgname.cabal
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 \
30 runhaskell Setup build $MAKEFLAGS
31 runhaskell Setup register --gen-script
32 runhaskell Setup unregister --gen-script
33 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
34 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
40 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
41 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
42 runhaskell Setup copy --destdir="$pkgdir"
43 install -D -m644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
44 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md