1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=configurator-ng
5 pkgname=haskell-configurator-ng
8 pkgdesc="The next generation of configuration management"
9 url="https://github.com/lpsmith/configurator-ng"
12 depends=('ghc-libs' "haskell-attoparsec" "haskell-critbit" "haskell-dlist" "haskell-data-ordlist"
13 "haskell-hashable" "haskell-scientific" "haskell-unix-compat"
14 "haskell-unordered-containers")
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
18 sha512sums=('7995be233ab367e807a66c6f0f412826dc6c916a895c5e145d5b21af2f867a0c69c6bd228e7d5425a69ea9b500ed51fb00025ca9090417aaee4ac1a027f2f77a'
19 'c0f0ed7bc5e61794e66950792c8664c84f78b664b15c91e7a8c7d4d547229500e04a2975c4a68908167ab6e636b6db87fd4f6e6af4730bfe3c24a60b22ddc129')
23 patch -p1 -i ../ghc-8.4.patch
25 sed -i '/fail/d' $_hkgname.cabal
31 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
32 --prefix=/usr --docdir=/usr/share/doc/$pkgname \
33 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
35 runhaskell Setup build
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
45 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47 runhaskell Setup copy --destdir="$pkgdir"
48 install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
49 rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"