summaryrefslogtreecommitdiff
path: root/pcr/octave-image/octave-image.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/octave-image/octave-image.install')
-rw-r--r--pcr/octave-image/octave-image.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/pcr/octave-image/octave-image.install b/pcr/octave-image/octave-image.install
new file mode 100644
index 000000000..5e4edf2da
--- /dev/null
+++ b/pcr/octave-image/octave-image.install
@@ -0,0 +1,20 @@
+_pack=image
+_prefix=/usr/share/octave/packages
+_libdir=/usr/lib/octave/packages
+
+## arg 1: the new package version
+post_install() {
+ octave -q -f --eval "pkg prefix $prefix $libdir; pkg install -verbose -global /usr/share/octave/$_pack.tar.gz"
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_remove
+ post_install
+}
+
+## arg 1: the old package version
+post_remove() {
+ octave -q -f --eval "pkg prefix $prefix $libdir; pkg uninstall $_pack; pkg rebuild -global"
+}