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

Felix Yan felixonmars at gemini.archlinux.org
Thu Sep 9 20:47:55 UTC 2021


    Date: Thursday, September 9, 2021 @ 20:47:55
  Author: felixonmars
Revision: 1013185

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-hiedb/repos/community-staging-x86_64/PKGBUILD (from rev 1013184, haskell-hiedb/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-09-09 20:47:55 UTC (rev 1013185)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hiedb
+pkgname=haskell-hiedb
+pkgver=0.4.0.0
+pkgrel=15
+pkgdesc="Generates a references DB from .hie files"
+url="https://github.com/wz1000/HieDb"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-algebraic-graphs' 'haskell-ansi-terminal' 'haskell-extra' 'haskell-ghc'
+         'haskell-ghc-api-compat' 'haskell-ghc-paths' 'haskell-hie-compat' 'haskell-lucid'
+         'haskell-optparse-applicative' 'haskell-sqlite-simple' 'haskell-terminal-size')
+makedepends=('ghc' 'haskell-hspec' 'haskell-temporary')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha512sums=('b45bb1e08544379c61a9bd3f38613be844320cd5bed65d181cc01c7f77724daf63e4cf6930db7f14873de8f2122efe7e10b933bd5d53d3a4df4c55f8343c0d7b')
+
+prepare() {
+  cd hiedb-$pkgver
+  sed -i 's/callProcess hc args/callProcess hc (["-dynamic"] ++ args)/' test/Main.hs
+}
+
+build() {
+  cd hiedb-$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 \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie'
+
+  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
+}
+
+check() {
+  cd hiedb-$pkgver
+  PATH="$PWD/dist/build/hiedb:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" runhaskell Setup test --show-details=direct
+}
+
+package() {
+  cd hiedb-$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 -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}



More information about the arch-commits mailing list