summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwenLiangcan2015-06-08 23:17:50 +0800
committerwenLiangcan2015-06-08 23:19:43 +0800
commita423ccf3f9c2f3ab1dcc1e5b35e47acebd68d635 (patch)
tree979e92e7374f72a0caf558a335095c23efdf71c7
downloadaur-haskell-configurator.tar.gz
haskell-configurator 0.3.0.0-2.
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD48
-rw-r--r--haskell-configurator.install26
3 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b2209c534cd9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = haskell-configurator
+ pkgdesc = A configuration management library for programs and daemons.
+ pkgver = 0.3.0.0
+ pkgrel = 2
+ url = http://hackage.haskell.org/package/configurator
+ install = haskell-configurator.install
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ makedepends = ghc
+ depends = haskell-attoparsec
+ depends = haskell-bytestring
+ depends = haskell-directory
+ depends = haskell-hashable
+ depends = haskell-text
+ depends = haskell-unix-compat
+ depends = haskell-unordered-containers
+ options = strip
+ options = staticlibs
+ source = http://hackage.haskell.org/packages/archive/configurator/0.3.0.0/configurator-0.3.0.0.tar.gz
+ md5sums = aac63c54d79daed3f5d854ee9d34a6ef
+
+pkgname = haskell-configurator
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6190a493d3fd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: wenLiangcan <boxeed at gmail dot com>
+# Contributor: Lex Black <autumn-wind at web dot de>
+
+pkgname=haskell-configurator
+_hkgname=configurator
+_licensefile=LICENSE
+pkgver=0.3.0.0
+pkgrel=2
+pkgdesc="A configuration management library for programs and daemons."
+url="http://hackage.haskell.org/package/configurator"
+license=('BSD3')
+arch=('i686' 'x86_64')
+makedepends=('ghc')
+depends=('haskell-attoparsec'
+ 'haskell-bytestring'
+ 'haskell-directory'
+ 'haskell-hashable'
+ 'haskell-text'
+ 'haskell-unix-compat'
+ 'haskell-unordered-containers')
+options=('strip' 'staticlibs')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install="${pkgname}.install"
+md5sums=('aac63c54d79daed3f5d854ee9d34a6ef')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+
+ runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ 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}/${_hkgname}-${pkgver}
+ 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 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}
+}
diff --git a/haskell-configurator.install b/haskell-configurator.install
new file mode 100644
index 000000000000..83fa5699c469
--- /dev/null
+++ b/haskell-configurator.install
@@ -0,0 +1,26 @@
+# custom variables
+pkgname=haskell-configurator
+HS_DIR=usr/share/haskell/${pkgname}
+
+# functions
+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)
+}