archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-ci / repos / community-x86_64 / PKGBUILD
blob59b40f100061e26c7b3e03b49bfdd6b24311b1c6
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
4 _hkgname=haskell-ci
5 pkgname=haskell-ci
6 pkgver=0.12.1
7 pkgrel=423
8 pkgdesc="Cabal package script generator for Travis-CI"
9 url="https://haskell-ci.rtfd.org/"
10 license=("GPL")
11 arch=('x86_64')
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')
24 prepare(){
25   cd $_hkgname-$pkgver
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
30 build() {
31   cd $_hkgname-$pkgver
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 \
37     --ghc-option='-pie'
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
46 package() {
47   cd $_hkgname-$pkgver
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