summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryardenac2013-05-09 16:26:14 -0700
committeryardenac2013-05-09 16:26:14 -0700
commite0bb914520d04608d86d3d6c7df4f0adbf30edb5 (patch)
treed6679642aac5426cfda4f66d0c2115e8aa3a2d67
downloadaur-e0bb914520d04608d86d3d6c7df4f0adbf30edb5.tar.gz
make subdir for packages
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD40
-rw-r--r--haskell-hsemail.install26
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ad8be52bc61
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = haskell-hsemail
+ pkgdesc = Internet Message Parsers
+ pkgver = 1.7.6
+ pkgrel = 1
+ url = http://hackage.haskell.org/package/hsemail
+ install = haskell-hsemail.install
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ makedepends = ghc
+ depends = haskell-base
+ depends = sh
+ depends = haskell-mtl
+ depends = haskell-old-time
+ depends = haskell-parsec
+ options = strip
+ source = http://hackage.haskell.org/packages/archive/hsemail/1.7.6/hsemail-1.7.6.tar.gz
+ sha256sums = 04c486b2e8a39b9091cd43df401200526837ddc1ddf3822240e6b09f25358c6c
+
+pkgname = haskell-hsemail
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0a2dea19dd4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+_hkgname=hsemail
+pkgname=haskell-hsemail
+pkgver=1.7.6
+pkgrel=1
+pkgdesc="Internet Message Parsers"
+url="http://hackage.haskell.org/package/$_hkgname"
+_licensefile=LICENSE
+license=("BSD3")
+arch=('i686' 'x86_64')
+makedepends=('ghc')
+depends=("haskell-base" "sh" "haskell-mtl" "haskell-old-time" "haskell-parsec")
+options=('strip')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install="${pkgname}.install"
+sha256sums=("04c486b2e8a39b9091cd43df401200526837ddc1ddf3822240e6b09f25358c6c")
+
+# PKGBUILD functions
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+
+ runhaskell Setup configure -O -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-hsemail.install b/haskell-hsemail.install
new file mode 100644
index 00000000000..6764193ab0c
--- /dev/null
+++ b/haskell-hsemail.install
@@ -0,0 +1,26 @@
+# custom variables
+pkgname=haskell-hsemail
+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)
+}