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

Felix Yan felixonmars at archlinux.org
Mon Aug 31 10:00:41 UTC 2020


    Date: Monday, August 31, 2020 @ 10:00:40
  Author: felixonmars
Revision: 694052

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 694051, haskell-tasty-discover/trunk/PKGBUILD)

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

Copied: haskell-tasty-discover/repos/community-staging-x86_64/PKGBUILD (from rev 694051, haskell-tasty-discover/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-08-31 10:00:40 UTC (rev 694052)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=tasty-discover
+pkgname=haskell-tasty-discover
+pkgver=4.2.1
+pkgrel=42
+pkgdesc="Test discovery for the tasty framework"
+url="http://git.coop/lwm/tasty-discover"
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-glob')
+makedepends=('ghc' 'haskell-hedgehog' 'haskell-tasty' '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=('46dff0398f012d58f53b151ceeea02831149d86d5c4dcc66217c7d53825efadb8dd8226d10d0082ef236763649a39e44c400994a93bd9e7052be7b527f8fa7b7')
+
+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 --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
+}
+
+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