archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-graphviz / trunk / PKGBUILD
blobdfe66221e1173c0fd96fa0dda1606f4e3cd83a5a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=graphviz
5 pkgname=haskell-graphviz
6 pkgver=2999.20.1.0
7 pkgrel=175
8 pkgdesc="Bindings to Graphviz for graph visualisation."
9 url="https://hackage.haskell.org/package/${_hkgname}"
10 license=("BSD")
11 arch=('x86_64')
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')
18 prepare() {
19     cd $_hkgname-$pkgver
20     uusi -u fgl $_hkgname.cabal
23 build() {
24     cd $_hkgname-$pkgver
25     
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 \
29             -f-test-parsing
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
37 package() {
38     cd $_hkgname-$pkgver
39     
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