summaryrefslogtreecommitdiff
path: root/gis/grass/grass.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-31 16:24:59 +0000
committerroot <root@rshg054.dnsready.net>2012-05-31 16:24:59 +0000
commitf5a8de28b86c2c838a28e79aa54f8b4c3fbd869e (patch)
tree26873b23c15ea28962e55ab4dc7ae94b468089cf /gis/grass/grass.install
parentf1ae949e08a764ac063703dc9bb7f0afd7c16e96 (diff)
Thu May 31 16:24:59 UTC 2012
Diffstat (limited to 'gis/grass/grass.install')
-rw-r--r--gis/grass/grass.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/gis/grass/grass.install b/gis/grass/grass.install
new file mode 100644
index 000000000..878ea0186
--- /dev/null
+++ b/gis/grass/grass.install
@@ -0,0 +1,26 @@
+## arg 1: the new package version
+post_install() {
+ pkgver=${1%-*}
+
+ # Create symlink for version workaround.
+ ln -sf /opt/grass-${pkgver} /opt/grass
+
+ echo 'Please relogin for required variables to be set from /etc/profile.d/grass.sh'
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ pkgver=${1%-*}
+
+ # Updating symlink for new version
+ ln -sf /opt/grass-${pkgver} /opt/grass
+}
+
+## arg 1: the old package version
+pre_remove() {
+ # Removing cruft symlink
+ rm -f /opt/grass
+}
+
+# vim:set ts=2 sw=2 et: