summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Nagy2015-06-08 19:38:08 +0200
committerDaniel Nagy2015-06-08 19:38:08 +0200
commitd63277f7162f8db36e0e0753e12483500d6de594 (patch)
treeed7bf8a01e7862bcd7aa7aec77ded3189b694f7a
downloadaur-d63277f7162f8db36e0e0753e12483500d6de594.tar.gz
import to aur4
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD46
-rw-r--r--ghc74.patch19
-rw-r--r--haskell-archlinux.install26
4 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4f0cf46cb140
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = haskell-archlinux
+ pkgdesc = Support for working with Arch Linux packages.
+ pkgver = 1.3
+ pkgrel = 3
+ url = http://github.com/archhaskell/
+ install = haskell-archlinux.install
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ depends = ghc
+ options = strip
+ options = staticlibs
+ source = http://hackage.haskell.org/packages/archive/archlinux/1.3/archlinux-1.3.tar.gz
+ source = ghc74.patch
+ sha256sums = a2cb945735719b5e40450ac9d5d8d6fe1b2b4c90043ce43040b82397867d3714
+ sha256sums = 95b5c4a9696e46ea36476536796a880195f82913962d713bb7d911c7d1cb788d
+
+pkgname = haskell-archlinux
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1fb1822476c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Daniel Nagy <danielnagy at gmx de>
+
+# custom variables
+_hkgname=archlinux
+_licensefile=LICENSE
+
+# PKGBUILD options/directives
+pkgname=haskell-archlinux
+pkgver=1.3
+pkgrel=3
+pkgdesc="Support for working with Arch Linux packages."
+url="http://github.com/archhaskell/"
+license=("BSD3")
+arch=('i686' 'x86_64')
+makedepends=()
+depends=("ghc")
+options=('strip' 'staticlibs')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz" "ghc74.patch")
+install="${pkgname}.install"
+# PKGBUILD functions
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ patch -Np1 -i "${srcdir}/ghc74.patch" || return 1
+
+ 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}
+}
+sha256sums=('a2cb945735719b5e40450ac9d5d8d6fe1b2b4c90043ce43040b82397867d3714'
+ '95b5c4a9696e46ea36476536796a880195f82913962d713bb7d911c7d1cb788d')
diff --git a/ghc74.patch b/ghc74.patch
new file mode 100644
index 000000000000..ccbc0270bcc3
--- /dev/null
+++ b/ghc74.patch
@@ -0,0 +1,19 @@
+diff -aur archlinux-1.3/Distribution/ArchLinux/PkgBuild.hs archlinux-1.3.new/Distribution/ArchLinux/PkgBuild.hs
+--- archlinux-1.3/Distribution/ArchLinux/PkgBuild.hs 2011-06-27 03:36:54.000000000 -0400
++++ archlinux-1.3.new/Distribution/ArchLinux/PkgBuild.hs 2012-03-04 17:33:18.650631617 -0500
+@@ -1,5 +1,6 @@
+ {-# LANGUAGE TypeSynonymInstances #-}
+ {-# LANGUAGE GeneralizedNewtypeDeriving #-}
++{-# LANGUAGE FlexibleInstances #-}
+ -- |
+ -- Module : Distribution.ArchLinux.PkgBuild
+ -- Copyright : (c) Don Stewart, 2008-2010
+@@ -28,7 +29,7 @@
+
+ import Text.PrettyPrint
+ import Data.List
+-import Data.Monoid
++import Data.Monoid hiding ((<>))
+ import Debug.Trace
+
+ import Control.Monad
diff --git a/haskell-archlinux.install b/haskell-archlinux.install
new file mode 100644
index 000000000000..f52ed8747232
--- /dev/null
+++ b/haskell-archlinux.install
@@ -0,0 +1,26 @@
+# custom variables
+pkgname=haskell-archlinux
+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)
+}