Date: Friday, May 14, 2021 @ 13:52:53 Author: felixonmars Revision: 934004
archrelease: copy trunk to community-staging-x86_64 Added: haskell-half/repos/community-staging-x86_64/ haskell-half/repos/community-staging-x86_64/PKGBUILD (from rev 934003, haskell-half/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: haskell-half/repos/community-staging-x86_64/PKGBUILD (from rev 934003, haskell-half/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-05-14 13:52:53 UTC (rev 934004) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=half +pkgname=haskell-half +pkgver=0.3.1 +pkgrel=37 +pkgdesc="Half-precision floating-point" +url="https://github.com/ekmett/half" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-test-framework' + 'haskell-test-framework-quickcheck2') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('39d2a20590f5d7f6c31ed9667a18dab9da88f145c3de910a2212c6dc4925ffbcfa7695548516b1ddeb1a44979ba0daba15615451e05437e0a6491a95f152f440') + +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 + runhaskell Setup build $MAKEFLAGS + 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 --show-details=direct +} + +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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}