summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcbpark2016-04-26 17:29:15 +0900
committercbpark2016-04-26 17:29:15 +0900
commit2e00e56c9f5bfb28fce7b5d64500529e64bf31a0 (patch)
tree8adf34f2be9e7fc78868a5174332be1f8fb26a1f
downloadaur-2e00e56c9f5bfb28fce7b5d64500529e64bf31a0.tar.gz
addpkg: haskell-ghc-exactprint 0.5.0.1-1
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD41
-rw-r--r--haskell-ghc-exactprint.install18
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..50dbe7a4691d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = haskell-ghc-exactprint
+ pkgdesc = GHC version of haskell-src-exts exactPrint
+ pkgver = 0.5.0.1
+ pkgrel = 1
+ epoch = 0
+ url = https://hackage.haskell.org/package/ghc-exactprint
+ install = haskell-ghc-exactprint.install
+ arch = i686
+ arch = x86_64
+ license = custom:BSD3
+ depends = ghc=7.10.3
+ depends = haskell-ghc-paths
+ depends = haskell-mtl
+ depends = haskell-syb
+ depends = haskell-free
+ options = staticlibs
+ source = http://hackage.haskell.org/packages/archive/ghc-exactprint/0.5.0.1/ghc-exactprint-0.5.0.1.tar.gz
+ sha256sums = ecdae12d521d0997a48a91507f241f80532df468f09095a50cc6f1629cd43ce8
+
+pkgname = haskell-ghc-exactprint
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b9f200e482b9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: cbpark <cbpark@gmail.com>
+
+_hkgname=ghc-exactprint
+pkgname=haskell-ghc-exactprint
+pkgver=0.5.0.1
+pkgrel=1
+epoch=0
+pkgdesc="GHC version of haskell-src-exts exactPrint"
+arch=('i686' 'x86_64')
+url="https://hackage.haskell.org/package/${_hkgname}"
+license=("custom:BSD3")
+depends=("ghc=7.10.3" "haskell-ghc-paths" "haskell-mtl" "haskell-syb" "haskell-free")
+options=('staticlibs')
+install="${pkgname}.install"
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+sha256sums=('ecdae12d521d0997a48a91507f241f80532df468f09095a50cc6f1629cd43ce8')
+
+build() {
+ cd "${srcdir}/${_hkgname}-${pkgver}"
+
+ runhaskell Setup configure -O --enable-library-profiling --enable-shared \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock --hoogle --html
+ 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 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/haskell-ghc-exactprint.install b/haskell-ghc-exactprint.install
new file mode 100644
index 000000000000..abf3f3bb90a2
--- /dev/null
+++ b/haskell-ghc-exactprint.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-ghc-exactprint
+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)
+} \ No newline at end of file