archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-haddock-library / repos / community-x86_64 / PKGBUILD
blob23bc1e6cf1ae5b10092adeb35476ccbcc62c40e8
1 # Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>
3 _hkgname=haddock-library
4 pkgname=haskell-haddock-library
5 pkgver=1.10.0
6 pkgrel=216
7 pkgdesc="A documentation-generation tool for Haskell libraries"
8 url="https://www.haskell.org/haddock/"
9 license=("BSD")
10 arch=('x86_64')
11 depends=('ghc-libs')
12 makedepends=('ghc' 'uusi' 'haskell-base-compat' 'haskell-hspec' 'haskell-hspec-discover'
13              'haskell-quickcheck' 'haskell-optparse-applicative' 'haskell-tree-diff')
14 source=("https://hackage.haskell.org/packages/archive/haddock-library/${pkgver}/haddock-library-${pkgver}.tar.gz")
15 sha512sums=('dac536a2b8e2764de1a1b1a16fc328e15455656c2992fb3b3bccdeae2bb6ac81fe94e164aa2a70cff7cea3b97347b8510aadb5fa1c0564bb2429947f0aace0d1')
17 prepare() {
18     cd $_hkgname-$pkgver
19     uusi -u base-compat -u tree-diff -u QuickCheck -u hspec -u optparse-applicative $_hkgname.cabal
22 build() {
23     cd $_hkgname-$pkgver
25     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
27         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
28     runhaskell Setup build $MAKEFLAGS
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 check() {
36     cd $_hkgname-$pkgver
37     runhaskell Setup test --show-details=direct
40 package() {
41     cd $_hkgname-$pkgver
43     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
44     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
45     runhaskell Setup copy --destdir="$pkgdir"
46     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
47     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE