summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-04-18 08:37:36 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-04-18 08:37:36 +0000
commit3ccf228757a25c164863a53b6cec7d5cb79317dd (patch)
treef8118fcc24c2ee30f742277ed9df99b73a318ab9 /setup_native
parent8fceadb7ad80438efa7ad52e8074fc80bf668d21 (diff)
INTEGRATION: CWS native145 (1.3.12); FILE MERGED
2008/04/14 15:58:54 is 1.3.12.1: #i88259# debian support
Diffstat (limited to 'setup_native')
-rwxr-xr-xsetup_native/source/packinfo/shellscripts_extensions.txt135
1 files changed, 135 insertions, 0 deletions
diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt
index b2bae2da3edc..70fffb4daeba 100755
--- a/setup_native/source/packinfo/shellscripts_extensions.txt
+++ b/setup_native/source/packinfo/shellscripts_extensions.txt
@@ -1,5 +1,7 @@
%system linux
+%format rpm
+
# As remove does not need the oxt file, this could potentially
# be done in the postinstall script as well.
%preinstall << END
@@ -109,6 +111,139 @@ fi
exit 0
END
+%format deb
+
+# As remove does not need the oxt file, this could potentially
+# be done in the postinstall script as well.
+%preinstall << END
+# if this is an update, remove the old package instance first
+if [ "$$1" != "upgrade" ]
+then
+ exit 0
+fi
+
+#Find the temp dir
+if [ -n "$$TMPDIR" ]
+then
+ UNOPKGTMP="$$TMPDIR"
+elif [ -n "$$TMP" ]
+then
+ UNOPKGTMP="$$TMP"
+elif [ -d "/tmp" ]
+then
+ UNOPKGTMP="/tmp"
+else
+ echo "No tmp directory found!"
+ exit 1
+fi
+
+
+#Create the command which creates a temporary directory
+if [ -x "/bin/mktemp" ]
+then
+ INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
+else
+ INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
+ mkdir "$$INSTDIR"
+fi
+
+if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
+then
+ "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml'
+fi
+
+if [ -n "$$INSTDIR" ]
+then
+ rm -rf "$$INSTDIR"
+fi
+
+exit 0
+END
+
+%postinstall << END
+#Find the temp dir
+if [ -n "$$TMPDIR" ]
+then
+ UNOPKGTMP="$$TMPDIR"
+elif [ -n "$$TMP" ]
+then
+ UNOPKGTMP="$$TMP"
+elif [ -d "/tmp" ]
+then
+ UNOPKGTMP="/tmp"
+else
+ echo "No tmp directory found!"
+ exit 1
+fi
+
+#Create the command which creates a temporary directory
+if [ -x "/bin/mktemp" ]
+then
+ INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
+else
+ INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
+ mkdir "$$INSTDIR"
+fi
+
+if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then
+ "PRODUCTDIRECTORYNAME/program/unopkg" add --shared "PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml'
+fi
+
+if [ -n "$$INSTDIR" ]
+then
+ rm -rf "$$INSTDIR"
+fi
+
+exit 0
+
+
+END
+
+%preremove << END
+# if this is an update, just do nothing
+
+if [ "$$1" = "upgrade" ]
+then
+ exit 0
+fi
+
+#Find the temp dir
+if [ -n "$$TMPDIR" ]
+then
+ UNOPKGTMP="$$TMPDIR"
+elif [ -n "$$TMP" ]
+then
+ UNOPKGTMP="$$TMP"
+elif [ -d "/tmp" ]
+then
+ UNOPKGTMP="/tmp"
+else
+ echo "No tmp directory found!"
+ exit 1
+fi
+
+#Create the command which creates a temporary directory
+if [ -x "/bin/mktemp" ]
+then
+ INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
+else
+ INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
+ mkdir "$$INSTDIR"
+fi
+
+if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
+then
+ "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml'
+fi
+
+if [ -n "$$INSTDIR" ]
+then
+ rm -rf "$$INSTDIR"
+fi
+
+exit 0
+END
+
%system solaris
%postinstall << END