summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriĆ  Arrufat2016-01-10 11:50:08 +0100
committerAdriĆ  Arrufat2016-01-10 11:50:08 +0100
commitb9378c782aae855829f352cc611e49e036fb3e2e (patch)
treef237b821af08336f74cb4c741fcf8c90cb1e2e9d
downloadaur-b9378c782aae855829f352cc611e49e036fb3e2e.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD43
-rw-r--r--haskell-storable-complex.install26
3 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3c64a9e7bc3d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sun Jan 10 10:49:44 UTC 2016
+pkgbase = haskell-storable-complex
+ pkgdesc = Storable instance for Complex which is binary compatible with C99, C++ and Fortran complex data types
+ pkgver = 0.2.2
+ pkgrel = 1
+ url = http://hackage.haskell.org/package/storable-complex
+ install = haskell-storable-complex.install
+ arch = i686
+ arch = x86_64
+ license = LGPL-3
+ depends = ghc
+ options = strip
+ options = staticlibs
+ source = http://hackage.haskell.org/packages/archive/storable-complex/0.2.2/storable-complex-0.2.2.tar.gz
+ md5sums = d18a04e10647672c69b479604d97f17d
+
+pkgname = haskell-storable-complex
+ depends = ghc=
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fb9471ca1618
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Adria Arrufat <adria.arrufat@protonmail.ch>
+
+pkgname=haskell-storable-complex
+pkgver=0.2.2
+pkgrel=1
+pkgdesc="Storable instance for Complex which is binary compatible with C99, C++ and Fortran complex data types"
+url="http://hackage.haskell.org/package/storable-complex"
+license=("LGPL-3")
+arch=('i686' 'x86_64')
+makedepends=()
+# deps adjusted to specific versions in package()
+depends=("ghc")
+options=('strip' 'staticlibs')
+install="${pkgname}.install"
+source=("http://hackage.haskell.org/packages/archive/storable-complex/${pkgver}/storable-complex-${pkgver}.tar.gz")
+md5sums=('d18a04e10647672c69b479604d97f17d')
+
+build() {
+ cd ${srcdir}/storable-complex-${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() {
+ _ghcver=`pacman -Q ghc | cut -f2 -d\ | cut -f1 -d-`
+ depends=("ghc=${_ghcver}")
+
+ cd ${srcdir}/storable-complex-${pkgver}
+ install -Dm744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -Dm744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -dm755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/storable-complex
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/haskell-storable-complex.install b/haskell-storable-complex.install
new file mode 100644
index 000000000000..af73fe45dc35
--- /dev/null
+++ b/haskell-storable-complex.install
@@ -0,0 +1,26 @@
+# custom variables
+pkgname=haskell-storable-complex
+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)
+}