summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Nagy2015-06-08 20:28:56 +0200
committerDaniel Nagy2015-06-08 20:28:56 +0200
commit3b56e4994fc52621a0f9abb8957f49638cfabd38 (patch)
tree5c91b1f273c8d11730215d2478de83937d609515
downloadaur-3b56e4994fc52621a0f9abb8957f49638cfabd38.tar.gz
import to aur4
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD39
-rw-r--r--haskell-dates.install26
3 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c15a27686b84
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = haskell-dates
+ pkgdesc = Allows to parse many different formats of dates
+ pkgver = 0.2.2.0
+ pkgrel = 1
+ url = http://hackage.haskell.org/package/dates
+ install = haskell-dates.install
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ makedepends = ghc
+ depends = haskell-base-unicode-symbols
+ depends = haskell-parsec
+ depends = haskell-syb
+ depends = haskell-time
+ options = strip
+ options = staticlibs
+ source = http://hackage.haskell.org/packages/archive/dates/0.2.2.0/dates-0.2.2.0.tar.gz
+ sha256sums = 0a10c9070d230b966942e08862d379ddcb11942c937008bbabbb5a10a303a921
+
+pkgname = haskell-dates
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f192957535b2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Daniel Nagy <danielnagy at gmx de>
+# Contributor: Lex Black <autumn-wind at web dot de>
+
+pkgname=haskell-dates
+_hkgname=dates
+pkgver=0.2.2.0
+pkgrel=1
+pkgdesc="Allows to parse many different formats of dates"
+url="http://hackage.haskell.org/package/dates"
+license=('BSD3')
+arch=('i686' 'x86_64')
+makedepends=('ghc')
+depends=('haskell-base-unicode-symbols' 'haskell-parsec' 'haskell-syb' 'haskell-time')
+options=('strip' 'staticlibs')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install="${pkgname}.install"
+sha256sums=('0a10c9070d230b966942e08862d379ddcb11942c937008bbabbb5a10a303a921')
+
+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}
+}
diff --git a/haskell-dates.install b/haskell-dates.install
new file mode 100644
index 000000000000..dc8abbe1227d
--- /dev/null
+++ b/haskell-dates.install
@@ -0,0 +1,26 @@
+# custom variables
+pkgname=haskell-dates
+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)
+}