archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-nonce / repos / community-x86_64 / PKGBUILD
blobeb2d5e62baba7ce438a9449a93c6cf9e4c822960
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=nonce
5 pkgname=haskell-nonce
6 pkgver=1.0.7
7 pkgrel=279
8 pkgdesc="Generate cryptographic nonces."
9 url="https://github.com/prowdsponsor/nonce"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-base64-bytestring' 'haskell-entropy' 'haskell-unliftio'
13          'haskell-unliftio-core')
14 makedepends=('ghc')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('89fb70578c8f52c652cdb4c1e6243529701bc21685862d7bbc750e2000424a029a8b164bde6c422a38e61944a15a8b788aa4aa70212bca9f12b5eaae801d8db0')
18 prepare() {
19     cd $_hkgname-$pkgver
20     sed -i 's/== 1.0/== 1.2/' $_hkgname.cabal
23 build() {
24     cd $_hkgname-$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     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 package() {
37     cd $_hkgname-$pkgver
39     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
40     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
41     runhaskell Setup copy --destdir="$pkgdir"
42     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
43     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE