[arch-commits] Commit in haskell-half/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Sat Nov 13 09:45:17 UTC 2021


    Date: Saturday, November 13, 2021 @ 09:45:17
  Author: felixonmars
Revision: 1044995

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 1044994, haskell-half/trunk/PKGBUILD)

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Copied: haskell-half/repos/community-staging-x86_64/PKGBUILD (from rev 1044994, haskell-half/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-11-13 09:45:17 UTC (rev 1044995)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=half
+pkgname=haskell-half
+pkgver=0.3.1
+pkgrel=62
+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 --ghc-option=-fllvm
+    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
+    # https://github.com/ekmett/half/issues/35
+    runhaskell Setup test --show-details=direct || echo "Tests failed"
+}
+
+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
+}



More information about the arch-commits mailing list