[arch-commits] Commit in hindent/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Jun 18 15:21:29 UTC 2017


    Date: Sunday, June 18, 2017 @ 15:21:29
  Author: felixonmars
Revision: 238076

upgpkg: hindent 5.2.3-14

rebuild with ghc,8.0.2

Modified:
  hindent/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-18 15:20:52 UTC (rev 238075)
+++ PKGBUILD	2017-06-18 15:21:29 UTC (rev 238076)
@@ -4,15 +4,14 @@
 
 pkgname=hindent
 pkgver=5.2.3
-pkgrel=13
+pkgrel=14
 pkgdesc="Extensible Haskell pretty printer"
 url="https://github.com/commercialhaskell/hindent"
 license=("custom:BSD3")
 arch=('i686' 'x86_64')
-depends=('gmp' 'libffi')
-makedepends=("ghc=8.0.1" "haskell-descriptive" "haskell-exceptions" "haskell-monad-loops"
-             "haskell-mtl" "haskell-path" "haskell-path-io" "haskell-src-exts" "haskell-text"
-             "haskell-unix-compat" "haskell-utf8-string" "haskell-yaml")
+depends=("ghc" "haskell-descriptive" "haskell-exceptions" "haskell-monad-loops" "haskell-mtl"
+         "haskell-path" "haskell-path-io" "haskell-src-exts" "haskell-text" "haskell-unix-compat"
+         "haskell-utf8-string" "haskell-yaml")
 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
 sha512sums=('478c207ffb408e31f15dbc5bf941acdc9116de1c775d393cb59514e4a28354865d808715005a7e6f076b86d4e5f5c0f389059c16d4761ffcec31953d2d88d969')
 
@@ -19,16 +18,28 @@
 build() {
     cd "${srcdir}/${pkgname}-${pkgver}"
     
-    runhaskell Setup configure -O --prefix=/usr \
-        --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname"
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+        --libsubdir=\$compiler/site-local/\$pkgid
     runhaskell Setup build
+    runhaskell Setup haddock --hoogle --html
+    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 "${srcdir}/${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"
+    install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
+    ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${pkgname}"
     runhaskell Setup copy --destdir="${pkgdir}"
-    rm -r "$pkgdir"/usr/{lib,share/doc}
-
     install -D -m644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
     rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE.md"
+
+    # Remove static libs
+    find "$pkgdir"/usr/lib -name "*.a" -delete
 }



More information about the arch-commits mailing list