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

Felix Yan felixonmars at gemini.archlinux.org
Mon Aug 8 17:43:21 UTC 2022


    Date: Monday, August 8, 2022 @ 17:43:21
  Author: felixonmars
Revision: 1261591

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-tasty-discover/repos/community-staging-x86_64/
  haskell-tasty-discover/repos/community-staging-x86_64/PKGBUILD
    (from rev 1261590, haskell-tasty-discover/trunk/PKGBUILD)

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

Copied: haskell-tasty-discover/repos/community-staging-x86_64/PKGBUILD (from rev 1261590, haskell-tasty-discover/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-08-08 17:43:21 UTC (rev 1261591)
@@ -0,0 +1,57 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=tasty-discover
+pkgname=haskell-tasty-discover
+pkgver=4.2.4
+pkgrel=7
+pkgdesc="Test discovery for the tasty framework"
+url="https://github.com/haskell-works/tasty-discover"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-glob' 'haskell-tasty')
+makedepends=('ghc' 'uusi' 'haskell-hedgehog' 'haskell-hspec' 'haskell-hspec-core'
+             'haskell-tasty-golden' 'haskell-tasty-hedgehog' 'haskell-tasty-hspec'
+             'haskell-tasty-hunit' 'haskell-tasty-quickcheck' 'haskell-tasty-smallcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('58f924002b06e04b825941e6516285aaa1d09836b2457e85c7dd8acb6a375bb7da481bf1eb7e2c989a31d0ae7d8743c746f67819d91a0e482c84644ea3360afd')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    uusi -u hspec $_hkgname.cabal
+}
+
+build() {
+    cd $_hkgname-$pkgver
+
+    # Hack to allow ghc execute tasty-discover when building tests
+    export PATH="$PWD/dist/build/$_hkgname:$PATH"
+    export LD_LIBRARY_PATH="$PWD/dist/build"
+
+    # Test could be built before executable, so build an executable first
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla
+    runhaskell Setup build $MAKEFLAGS
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$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
+    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
+}



More information about the arch-commits mailing list