[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Fri May 31 07:32:17 UTC 2019


    Date: Friday, May 31, 2019 @ 07:32:16
  Author: felixonmars
Revision: 475858

addpkg: haskell-text-format 0.3.2-1

Added:
  haskell-text-format/
  haskell-text-format/repos/
  haskell-text-format/trunk/
  haskell-text-format/trunk/PKGBUILD

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

Added: haskell-text-format/trunk/PKGBUILD
===================================================================
--- haskell-text-format/trunk/PKGBUILD	                        (rev 0)
+++ haskell-text-format/trunk/PKGBUILD	2019-05-31 07:32:16 UTC (rev 475858)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=text-format
+pkgname=haskell-text-format
+pkgver=0.3.2
+pkgrel=1
+pkgdesc="Text formatting"
+url="https://github.com/bos/text-format"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-double-conversion' 'haskell-old-locale')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('504de6e6e29dd97202b049762923686f3677e2550197518c9253b098b0d3c7b93a1d52d6912f2ab18138357656cd5c2bd36d569528f7e11296ad3ed61653d093')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/< *4.12/<5/' $_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
+    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" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}



More information about the arch-commits mailing list