summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Manenti2022-11-29 17:10:25 +0100
committerAndrea Manenti2022-11-29 17:10:25 +0100
commit772ae681f11977793711dbaf275810a34fb6d242 (patch)
tree384389d89f4ea24c37a3c86a1825836ac92f0360
downloadaur-772ae681f11977793711dbaf275810a34fb6d242.tar.gz
New package: haskell-ghc-heap-view
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD46
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..638dd2259cf8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = haskell-ghc-heap-view
+ pkgdesc = Extract the heap representation of Haskell values and thunks
+ pkgver = 0.6.3
+ pkgrel = 1
+ url = git://git.nomeata.de/ghc-heap-view.git
+ arch = x86_64
+ license = BSD
+ makedepends = ghc
+ depends = ghc-libs
+ source = https://hackage.haskell.org/packages/archive/ghc-heap-view/0.6.3/ghc-heap-view-0.6.3.tar.gz
+ sha256sums = 327e61f67e90cfcb766a3e6ea5f021dc588659e681fe9b5182f3f882925194df
+
+pkgname = haskell-ghc-heap-view
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f401a3f6c341
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Andrea Manenti <andrea [dot] manenti [at] yahoo.com>
+
+_hkgname=ghc-heap-view
+pkgname=haskell-ghc-heap-view
+pkgver=0.6.3
+pkgrel=1
+pkgdesc="Extract the heap representation of Haskell values and thunks"
+url="git://git.nomeata.de/ghc-heap-view.git"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('327e61f67e90cfcb766a3e6ea5f021dc588659e681fe9b5182f3f882925194df')
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=haskell-ghc-heap-view --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie' \
+ -f-prim-supports-any
+
+ 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 $_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 -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}