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

Felix Yan felixonmars at archlinux.org
Sat Aug 15 22:41:49 UTC 2020


    Date: Saturday, August 15, 2020 @ 22:41:49
  Author: felixonmars
Revision: 680225

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-text-metrics/repos/community-staging-x86_64/
  haskell-text-metrics/repos/community-staging-x86_64/PKGBUILD
    (from rev 680224, haskell-text-metrics/trunk/PKGBUILD)

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

Copied: haskell-text-metrics/repos/community-staging-x86_64/PKGBUILD (from rev 680224, haskell-text-metrics/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-08-15 22:41:49 UTC (rev 680225)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=text-metrics
+pkgname=haskell-text-metrics
+pkgver=0.3.0
+pkgrel=62
+pkgdesc="Calculate various string metrics efficiently"
+url="https://github.com/mrkkrp/text-metrics"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-vector')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+sha512sums=('fa005ad7aeb5fd96ce121c5eab9e83e5826eec288a269f6ce258b3f6aff408c8ca98b8131b6cd14fa8e56f8568eb5a63beb63935335b7c695a3f6e09a979eccf')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/< *0.6/<1/' $_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 \
+        --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
+}
+
+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.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md
+}



More information about the arch-commits mailing list