archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-hopenpgp / trunk / PKGBUILD
blob55074e34993113eff424dc801e2f91c8002e16ed
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=hOpenPGP
4 pkgname=haskell-hopenpgp
5 pkgver=2.9.8
6 pkgrel=104
7 pkgdesc="Native Haskell implementation of OpenPGP (RFC4880)"
8 url="http://floss.scru.org/hOpenPGP/"
9 license=('MIT')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-asn1-encoding' 'haskell-attoparsec'
12          'haskell-base16-bytestring' 'haskell-bifunctors' 'haskell-bz2' 'haskell-binary-conduit'
13          'haskell-conduit' 'haskell-conduit-extra' 'haskell-cryptonite'
14          'haskell-crypto-cipher-types' 'haskell-errors' 'haskell-hashable'
15          'haskell-incremental-parser' 'haskell-ixset-typed' 'haskell-lens' 'haskell-memory'
16          'haskell-monad-loops' 'haskell-nettle' 'haskell-network-uri'
17          'haskell-openpgp-asciiarmor' 'haskell-prettyprinter' 'haskell-resourcet' 'haskell-split'
18          'haskell-time-locale-compat' 'haskell-unliftio-core' 'haskell-unordered-containers'
19          'haskell-zlib')
20 makedepends=('ghc' 'haskell-quickcheck' 'haskell-quickcheck-instances' 'haskell-tasty'
21              'haskell-tasty-hunit' 'haskell-tasty-quickcheck')
22 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
23 sha512sums=('2d4ccf9af498b0ec33d353fa891b555109318dc5f0c5be5eb4165ff88115efcd79d4d28a89909cd224abfd64ddc3e332c07b59e3202c9dbccabd70405c78edfa')
25 build() {
26     cd $_hkgname-$pkgver
27     
28     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31             -fnetwork-uri
32     runhaskell Setup build $MAKEFLAGS
33     runhaskell Setup register --gen-script
34     runhaskell Setup unregister --gen-script
35     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
36     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
39 check() {
40     cd $_hkgname-$pkgver
41     runhaskell Setup test --show-details=direct
44 package() {
45     cd $_hkgname-$pkgver
46     
47     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
48     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
49     runhaskell Setup copy --destdir="$pkgdir"
50     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
51     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE