1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
8 pkgdesc="Cabal package script generator for Travis-CI"
9 url="https://haskell-ci.rtfd.org/"
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-base-compat'
13 'haskell-base16-bytestring' 'haskell-cabal-install-parsers' 'haskell-cryptohash-sha256'
14 'haskell-generic-lens-lite' 'haskell-hsyaml' 'haskell-indexed-traversable'
15 'haskell-indexed-traversable-instances' 'haskell-ini' 'haskell-lattices'
16 'haskell-network-uri' 'haskell-optparse-applicative' 'shellcheck' 'haskell-temporary'
17 'haskell-unordered-containers' 'haskell-zinza')
18 makedepends=('ghc' 'uusi' 'haskell-diff' 'haskell-ansi-terminal' 'haskell-tasty' 'haskell-tasty-golden')
19 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
20 haskell-ci-aeson-2.patch)
21 sha512sums=('d93a6b8e880255469b34b568320659802252379f0c5486ed315b366fd07dae935a480047468912bc5a397b9e55b00ea964451790f963d05b8df1d426d871da1c'
22 '6f96010eec7add9740b5c760c76a9dad01e391ebd503c52c93b0126fee7d48e29e3ffd30c387908b0341ebaf20b34caafbd2d291b2f5e0a22b086f0402784497')
26 patch -p1 -i ../haskell-ci-aeson-2.patch
27 uusi -u aeson -u attoparsec -u base-compat -u lattices -u optparse-applicative -u ShellCheck $_hkgname.cabal
33 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
34 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
35 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
36 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
39 runhaskell Setup build $MAKEFLAGS
40 runhaskell Setup register --gen-script
41 runhaskell Setup unregister --gen-script
42 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
43 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
49 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51 runhaskell Setup copy --destdir="$pkgdir"
52 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
53 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE