summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commite2f1553656d88f9a7ac254ea3681e6dc6d4cbb2d (patch)
treed6e6d9f4629fa4674adf78fc31dd335bc96b61b5
downloadaur-e2f1553656d88f9a7ac254ea3681e6dc6d4cbb2d.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD50
-rw-r--r--curl-aeson.install18
3 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a273856cdbf9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = haskell-curl-aeson
+ pkgdesc = Communicate with HTTP service using JSON
+ pkgver = 0.0.4
+ pkgrel = 1
+ url = https://github.com/zouppen/haskell-curl-aeson
+ install = curl-aeson.install
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ makedepends = ghc
+ makedepends = haskell-aeson
+ makedepends = haskell-curl
+ makedepends = haskell-text
+ makedepends = haskell-utf8-string
+ options = strip
+ source = https://hackage.haskell.org/package/curl-aeson-0.0.4/curl-aeson-0.0.4.tar.gz
+ sha256sums = 3defd8313d3e34657bd4c5aa7f0c4e1b7a6e533eaeffc1571eee2de31021f1ba
+
+pkgname = haskell-curl-aeson
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c82cecd5ebcc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=haskell-curl-aeson
+pkgver=0.0.4
+pkgrel=1
+pkgdesc="Communicate with HTTP service using JSON"
+arch=('i686' 'x86_64')
+makedepends=('ghc'
+ 'haskell-aeson'
+ 'haskell-curl'
+ 'haskell-text'
+ 'haskell-utf8-string')
+url="https://github.com/zouppen/haskell-curl-aeson"
+license=('BSD3')
+source=(https://hackage.haskell.org/package/${pkgname#haskell-}-$pkgver/${pkgname#haskell-}-$pkgver.tar.gz)
+sha256sums=('3defd8313d3e34657bd4c5aa7f0c4e1b7a6e533eaeffc1571eee2de31021f1ba')
+options=('strip')
+install=curl-aeson.install
+
+build() {
+ cd "$srcdir/${pkgname#haskell-}-$pkgver"
+
+ msg 'Building...'
+ runhaskell Setup configure \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/curl-aeson \
+ --enable-split-objs \
+ --enable-shared \
+ -O -p
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "$srcdir/${pkgname#haskell-}-$pkgver"
+
+ msg 'Installing license...'
+ install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ msg 'Installing...'
+ install -Dm 744 register.sh "$pkgdir/usr/share/haskell/${pkgname#haskell-}/register.sh"
+ install -Dm 744 unregister.sh "$pkgdir/usr/share/haskell/${pkgname#haskell-}/unregister.sh"
+ install -dm 755 "$pkgdir/usr/share/doc/ghc/html/libraries"
+ ln -s /usr/share/doc/${pkgname#haskell-}/html "$pkgdir/usr/share/doc/ghc/html/libraries/${pkgname#haskell-}"
+ runhaskell Setup copy --destdir="$pkgdir"
+ rm -f "$pkgdir/usr/share/doc/${pkgname#haskell-}/LICENSE"
+}
diff --git a/curl-aeson.install b/curl-aeson.install
new file mode 100644
index 000000000000..276275f5035c
--- /dev/null
+++ b/curl-aeson.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/curl-aeson
+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)
+}