summaryrefslogtreecommitdiff
path: root/extra/haskell-http/haskell-http.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-http/haskell-http.install
parentf38edbff3878008c8b2ae1ca8a496c349763017b (diff)
Mon Apr 29 00:34:20 PDT 2013
Diffstat (limited to 'extra/haskell-http/haskell-http.install')
-rw-r--r--extra/haskell-http/haskell-http.install33
1 files changed, 25 insertions, 8 deletions
diff --git a/extra/haskell-http/haskell-http.install b/extra/haskell-http/haskell-http.install
index fdebb1cb8..0593ec4e2 100644
--- a/extra/haskell-http/haskell-http.install
+++ b/extra/haskell-http/haskell-http.install
@@ -1,18 +1,35 @@
-HS_DIR=usr/share/haskell/haskell-http
-post_install() {
- ${HS_DIR}/register.sh
+pkgname=haskell-http
+
+_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
}