archrelease: copy trunk to community-any
[ArchLinux/community.git] / hoogle / repos / community-x86_64 / PKGBUILD
blob2a79ff1dec11e212f7e1cdffd7f38803fa8e0c13
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 pkgname=hoogle
5 pkgver=5.0.18.3
6 pkgrel=145
7 pkgdesc="Haskell API Search"
8 url="https://www.haskell.org/hoogle/"
9 license=("BSD")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-quickcheck' 'haskell-aeson' 'haskell-blaze-html'
12          'haskell-blaze-markup' 'haskell-cmdargs' 'haskell-conduit' 'haskell-conduit-extra'
13          'haskell-connection' 'haskell-extra' 'haskell-foundation' 'haskell-hashable'
14          'haskell-http-conduit' 'haskell-http-types' 'haskell-js-flot' 'haskell-js-jquery'
15          'haskell-mmap' 'haskell-network' 'haskell-old-locale' 'haskell-process-extras'
16          'haskell-resourcet' 'haskell-src-exts' 'haskell-storable-tuple' 'haskell-tar'
17          'haskell-uniplate' 'haskell-utf8-string' 'haskell-vector' 'haskell-wai'
18          'haskell-wai-logger' 'haskell-warp' 'haskell-warp-tls' 'haskell-zlib')
19 makedepends=('ghc')
20 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
21 sha512sums=('9e1f736411390c2807b46a555962b6346e8ce3b7cb2bb61ef38142992b02f2fcf636e4bc796d7bb582834810191a2f296b094cfc9630ab3ab170949c5aab1d23')
23 build() {
24     cd $pkgname-$pkgver
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
29         --ghc-option='-pie'
30     runhaskell Setup build $MAKEFLAGS
31     runhaskell Setup register --gen-script
32     runhaskell Setup unregister --gen-script
33     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
34     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 package() {
38     cd $pkgname-$pkgver
40     install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
41     install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
42     runhaskell Setup copy --destdir="${pkgdir}"
43     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
44     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE