summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Martí2016-03-18 12:43:14 +0000
committerDaniel Martí2016-03-18 12:49:24 +0000
commite35e9de94b8cdbd0229b712caf6156f30fc4f6dc (patch)
tree7efb88515fa3f1c6fc69ab69466ec4b9a793d0d8
downloadaur-e35e9de94b8cdbd0229b712caf6156f30fc4f6dc.tar.gz
First commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD42
-rw-r--r--haskell-hint.install18
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b17a86c3c1c8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Fri Mar 18 12:49:02 UTC 2016
+pkgbase = haskell-hint
+ pkgdesc = Runtime Haskell interpreter (GHC API wrapper)
+ pkgver = 0.5.1
+ pkgrel = 1
+ url = https://github.com/mvdan/hint
+ install = haskell-hint.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = haskell-directory
+ makedepends = haskell-exceptions
+ makedepends = haskell-filepath
+ makedepends = haskell-ghc-paths
+ makedepends = haskell-mtl
+ makedepends = haskell-random
+ depends = ghc
+ source = git+https://github.com/mvdan/hint#tag=v0.5.1
+ md5sums = SKIP
+
+pkgname = haskell-hint
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ef31ebb8d3a3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Daniel Martí <mvdan@mvdan.cc>
+
+_hkgname=hint
+pkgname=haskell-hint
+pkgver=0.5.1
+pkgrel=1
+pkgdesc="Runtime Haskell interpreter (GHC API wrapper)"
+url="https://github.com/mvdan/$_hkgname"
+license=('BSD')
+arch=('i686' 'x86_64')
+depends=('ghc')
+makedepends=('haskell-directory' 'haskell-exceptions' 'haskell-filepath' 'haskell-ghc-paths' 'haskell-mtl' 'haskell-random')
+source=("git+${url}#tag=v${pkgver}")
+md5sums=('SKIP')
+install="${pkgname}.install"
+
+build() {
+ cd "${srcdir}/${_hkgname}"
+
+ runhaskell Setup configure -O --enable-library-profiling --enable-shared \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgbase}" --datasubdir="$pkgbase" \
+ --libsubdir=\$compiler/site-local/\$pkgid \
+ -fgpl -fthreaded
+ 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.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "${srcdir}/${_hkgname}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/${pkgname}/register.sh"
+ install -m744 unregister.sh "${pkgdir}/usr/share/haskell/${pkgname}/unregister.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/${_hkgname}"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}
diff --git a/haskell-hint.install b/haskell-hint.install
new file mode 100644
index 000000000000..b812ed46252d
--- /dev/null
+++ b/haskell-hint.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-hint
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}