summaryrefslogtreecommitdiff
path: root/extra/haskell-text/haskell-text.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/haskell-text/haskell-text.install')
-rw-r--r--extra/haskell-text/haskell-text.install33
1 files changed, 25 insertions, 8 deletions
diff --git a/extra/haskell-text/haskell-text.install b/extra/haskell-text/haskell-text.install
index 620db3921..44ef4244a 100644
--- a/extra/haskell-text/haskell-text.install
+++ b/extra/haskell-text/haskell-text.install
@@ -1,18 +1,35 @@
-HS_DIR=usr/share/haskell/haskell-text
-post_install() {
- ${HS_DIR}/register.sh
+pkgname=haskell-text
+
+_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
}