1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 pkgname=haskell-gtk2hs-buildtools
6 pkgdesc="Tools to build the Gtk2Hs suite of User Interface libraries."
7 url="https://hackage.haskell.org/package/gtk2hs-buildtools"
10 depends=('ghc-libs' 'haskell-random' 'haskell-hashtables')
11 makedepends=('alex' 'happy' 'ghc')
12 provides=('gtk2hs-buildtools')
13 conflicts=('gtk2hs-buildtools')
14 replaces=('gtk2hs-buildtools')
15 source=("https://hackage.haskell.org/packages/archive/gtk2hs-buildtools/${pkgver}/gtk2hs-buildtools-${pkgver}.tar.gz")
16 sha512sums=('bf419af7698b14347815132aab9d70ccee6d3f17cf3fe55057048c271b7a62bc1321d4f664cbf68ca8fb3107ae65d6a886c928b2caef3eff3e65cecd5e2e5b02')
19 cd gtk2hs-buildtools-$pkgver
21 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
22 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
23 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid # --ghc-option=-fllvm
24 runhaskell Setup build $MAKEFLAGS
25 runhaskell Setup register --gen-script
26 runhaskell Setup unregister --gen-script
27 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
28 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
32 cd gtk2hs-buildtools-$pkgver
34 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
35 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
36 runhaskell Setup copy --destdir="$pkgdir"