1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
8 pkgdesc="Generate cryptographic nonces."
9 url="https://github.com/prowdsponsor/nonce"
12 depends=('ghc-libs' 'haskell-base64-bytestring' 'haskell-entropy' 'haskell-unliftio'
13 'haskell-unliftio-core')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('89fb70578c8f52c652cdb4c1e6243529701bc21685862d7bbc750e2000424a029a8b164bde6c422a38e61944a15a8b788aa4aa70212bca9f12b5eaae801d8db0')
20 sed -i 's/== 1.0/== 1.2/' $_hkgname.cabal
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
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