summaryrefslogtreecommitdiff
path: root/extra/haskell-parsec/haskell-parsec.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-04-29 00:34:23 -0700
committerroot <root@rshg054.dnsready.net>2013-04-29 00:34:23 -0700
commitbab69e0f720c6f189c4486b7b945079be23f0a4b (patch)
tree381ff8864fb51d2d7510c6cb1dc2bc8972b8de47 /extra/haskell-parsec/haskell-parsec.install
parentf38edbff3878008c8b2ae1ca8a496c349763017b (diff)
Mon Apr 29 00:34:20 PDT 2013
Diffstat (limited to 'extra/haskell-parsec/haskell-parsec.install')
-rw-r--r--extra/haskell-parsec/haskell-parsec.install33
1 files changed, 25 insertions, 8 deletions
diff --git a/extra/haskell-parsec/haskell-parsec.install b/extra/haskell-parsec/haskell-parsec.install
index dfa0701b9..25f4e6e9b 100644
--- a/extra/haskell-parsec/haskell-parsec.install
+++ b/extra/haskell-parsec/haskell-parsec.install
@@ -1,18 +1,35 @@
-HS_DIR=usr/share/haskell/haskell-parsec
-post_install() {
- ${HS_DIR}/register.sh
+pkgname=haskell-parsec
+
+_register() {
+ usr/share/haskell/${pkgname}/register.sh
+}
+
+_unregister() {
+ usr/share/haskell/${pkgname}/unregister.sh
+}
+
+_gen_contents() {
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
+
+post_install() {
+ _register
+ _gen_contents
+}
+
pre_upgrade() {
- ${HS_DIR}/unregister.sh
+ _unregister
}
+
post_upgrade() {
- ${HS_DIR}/register.sh
- (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+ _register
+ _gen_contents
}
+
pre_remove() {
- ${HS_DIR}/unregister.sh
+ _unregister
}
+
post_remove() {
- (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+ _gen_contents
}