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

Felix Yan felixonmars at archlinux.org
Tue Oct 6 22:57:24 UTC 2020


    Date: Tuesday, October 6, 2020 @ 22:57:24
  Author: felixonmars
Revision: 719851

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-hsyaml/repos/community-staging-x86_64/
  haskell-hsyaml/repos/community-staging-x86_64/PKGBUILD
    (from rev 719850, haskell-hsyaml/trunk/PKGBUILD)

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

Copied: haskell-hsyaml/repos/community-staging-x86_64/PKGBUILD (from rev 719850, haskell-hsyaml/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-10-06 22:57:24 UTC (rev 719851)
@@ -0,0 +1,46 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=HsYAML
+pkgname=haskell-hsyaml
+pkgver=0.2.1.0
+pkgrel=42
+pkgdesc="Pure Haskell YAML 1.2 processor"
+url="https://github.com/hvr/HsYAML"
+license=('GPL')
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc' 'haskell-quickcheck' 'haskell-tasty' 'haskell-tasty-quickcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('f8ad41a99e48183835093ad8bf6a3fbdf4b9ad9df3bea46b12efd55a9555c22bd2595c72b1ac2e73379ab47e21f6cbf9022412db8971e1c7c02a32e824f53304')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/== 2.13.\*//;s/< *4.14/<5/;s/== *1.2/== 1.3/' $_hkgname.cabal
+}
+
+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
+}
+
+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"
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.GPLv{2,3}
+}


More information about the arch-commits mailing list