Date: Friday, July 16, 2021 @ 07:32:17 Author: felixonmars Revision: 977574
addpkg: haskell-arithmoi 0.12.0.0-1 Added: haskell-arithmoi/ haskell-arithmoi/repos/ haskell-arithmoi/trunk/ haskell-arithmoi/trunk/PKGBUILD ----------+ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) Added: haskell-arithmoi/trunk/PKGBUILD =================================================================== --- haskell-arithmoi/trunk/PKGBUILD (rev 0) +++ haskell-arithmoi/trunk/PKGBUILD 2021-07-16 07:32:17 UTC (rev 977574) @@ -0,0 +1,54 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=arithmoi +pkgname=haskell-arithmoi +pkgver=0.12.0.0 +pkgrel=1 +pkgdesc="Efficient basic number-theoretic functions." +url="https://github.com/Bodigrim/arithmoi" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs' 'haskell-chimera' 'haskell-constraints' 'haskell-exact-pi' + 'haskell-integer-logarithms' 'haskell-integer-roots' 'haskell-mod' 'haskell-random' + 'haskell-semirings' 'haskell-vector') +makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-quickcheck-classes' 'haskell-smallcheck' + 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck' 'haskell-tasty-rerun' + 'haskell-tasty-smallcheck' 'haskell-vector-sized') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('6ef092fe87feab2a0f5a80d15e302ed9c0085fbbe124d490740a6ef1497ef0d1') + +prepare() { + cd $_hkgname-$pkgver + gen-setup +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + runhaskell Setup build + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +} \ No newline at end of file