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

Felix Yan felixonmars at archlinux.org
Sat Feb 22 12:53:58 UTC 2020


    Date: Saturday, February 22, 2020 @ 12:53:54
  Author: felixonmars
Revision: 578491

archrelease: copy trunk to community-staging-x86_64

Added:
  hindent/repos/community-staging-x86_64/
  hindent/repos/community-staging-x86_64/PKGBUILD
    (from rev 578490, hindent/trunk/PKGBUILD)

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

Copied: hindent/repos/community-staging-x86_64/PKGBUILD (from rev 578490, hindent/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-02-22 12:53:54 UTC (rev 578491)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=hindent
+pkgver=5.3.1
+pkgrel=56
+pkgdesc="Extensible Haskell pretty printer"
+url="https://github.com/commercialhaskell/hindent"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-exceptions' 'haskell-monad-loops' 'haskell-optparse-applicative'
+         'haskell-path' 'haskell-path-io' 'haskell-src-exts' 'haskell-unix-compat'
+         'haskell-utf8-string' 'haskell-yaml')
+makedepends=('ghc' 'haskell-diff' 'haskell-hspec')
+source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('fee2298ddd59cfb1fac008dca9d6b761cecdecc4eabd7752994e6c9917b19e042100c93e440a64027ee8c8962de899605f93503f2c721e87a18a6c957892fab8')
+
+prepare() {
+    cd $pkgname-$pkgver
+    sed -i 's/fail /error /' src/HIndent/Types.hs
+    sed -i 's/fail$/error/' src/main/Test.hs
+}
+
+build() {
+    cd $pkgname-$pkgver
+
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --enable-tests --datasubdir="$pkgname" \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+        --ghc-option='-pie'
+    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 $pkgname-$pkgver
+    runhaskell Setup test
+}
+
+package() {
+    cd $pkgname-$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