Date: Thursday, June 28, 2018 @ 12:16:16
  Author: felixonmars
Revision: 346616

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-stringbuilder/repos/community-staging-x86_64/PKGBUILD (from rev 
346615, haskell-stringbuilder/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-06-28 12:16:16 UTC (rev 346616)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=stringbuilder
+pkgname=haskell-stringbuilder
+pkgver=0.5.1
+pkgrel=18
+pkgdesc="A writer monad for multi-line string literals"
+url="https://github.com/sol/stringbuilder";
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+checkdepends=('haskell-hspec' 'haskell-quickcheck')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz";)
+sha512sums=('09cbf01dce82b325393c0d6f0264792695d528a184052f5e1d5dbd3fc181fd11c280e77ba445f1e44c6a8dabc0b267aa90f4a9f1fc34135f1b741d2a5dca9369')
+
+build() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+
+    if (( CHECKFUNC )); then
+        _opts=('--enable-tests')
+    else
+        _opts=('--disable-tests')
+    fi
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" "${_opts[@]}" \
+        --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
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    runhaskell Setup test
+}
+
+package() {
+    cd "${srcdir}/${_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"
+}

Reply via email to