5 if [ -n "$$TMPDIR" ]; then
7 elif [ -n "$$TMP" ]; then
9 elif [ -d "/tmp" ]; then
12 echo "No tmp directory found!"
16 #Create the command which creates a temporary directory
17 if [ -x "/usr/bin/mktemp" ]
19 INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
21 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
26 # Need to check diskless service install and make sure use the correct unpkg
28 DISKLESS_SRVC=`echo $$BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_$${ARCH}.all`
29 if [ "$$DISKLESS_SRVC" ]; then
30 UNOPKG=/export/Solaris_11/usr_`uname -p`.all/opt/staroffice9/program/unopkg
31 POSTRUN=$$PKG_INSTALL_ROOT/usr_`uname -p`.all/usr/lib/postrun
32 CLIENT_BASEDIR=$$PKG_INSTALL_ROOT/usr_$${ARCH}.all
34 UNOPKG=$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg
35 POSTRUN=$$PKG_INSTALL_ROOT/usr/lib/postrun
37 # Use postrun command on Solaris where available (OpenSolaris)
38 if [ -x $$POSTRUN ]; then
39 ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0"
41 echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" add --shared --bundled \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
42 ) | $$POSTRUN -b -c UNOPKG
43 if [ "$$?" != "0" ]; then
44 echo "\nERROR: Installation of UNO extension ${OXTFILENAME}"
45 echo " through $$POSTRUN failed."
49 # No postrun available, try running unopkg directly
50 "$$UNOPKG" add --shared --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
51 if [ "$$?" != "0" ]; then
52 echo "\nERROR: Installation of UNO extension ${OXTFILENAME} failed."
53 test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root install requires SUNWpostrun package to be installed"
54 echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.'
59 if [ -n "$$INSTDIR" ]; then
67 if [ -n "$$TMPDIR" ]; then
69 elif [ -n "$$TMP" ]; then
71 elif [ -d "/tmp" ]; then
74 echo "No tmp directory found!"
78 #Create the command which creates a temporary directory
79 if [ -x "/usr/bin/mktemp" ]
81 INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
83 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
87 # Use postrun command on Solaris where available (OpenSolaris)
88 if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then
89 ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0"
90 echo "cd \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program\""
92 echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" remove --shared --bundled \"${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
93 echo "rm -rf \"$$INSTDIR\""
94 ) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG
96 # No postrun available, try running unopkg directly
97 test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0
98 "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
99 if [ "$$?" != "0" ]; then
100 echo "\nERROR: Removal of UNO extension ${OXTFILENAME} failed."
101 test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root uninstall requires SUNWpostrun package to be installed"
102 echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.'
107 if [ -n "$$INSTDIR" ]; then
118 # As remove does not need the oxt file, this could potentially
119 # be done in the postinstall script as well.
121 # if this is an update, remove the old package instance first
122 test "$$1" = "2" || exit 0
125 if [ -n "$$TMPDIR" ]; then
127 elif [ -n "$$TMP" ]; then
129 elif [ -d "/tmp" ]; then
132 echo "No tmp directory found!"
136 #Create the command which creates a temporary directory
137 if [ -x "/bin/mktemp" ]
139 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
141 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
145 if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
146 "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
149 if [ -n "$$INSTDIR" ]; then
158 if [ -n "$$TMPDIR" ]; then
160 elif [ -n "$$TMP" ]; then
162 elif [ -d "/tmp" ]; then
165 echo "No tmp directory found!"
169 #Create the command which creates a temporary directory
170 if [ -x "/bin/mktemp" ]
172 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
174 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
178 if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
179 "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" add --shared --shared "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
182 if [ -n "$$INSTDIR" ]; then
192 # if this is an update, just do nothing
193 test "$$1" = "0" || exit 0
196 if [ -n "$$TMPDIR" ]; then
198 elif [ -n "$$TMP" ]; then
200 elif [ -d "/tmp" ]; then
203 echo "No tmp directory found!"
207 #Create the command which creates a temporary directory
208 if [ -x "/bin/mktemp" ]
210 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
212 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
216 if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
217 "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
220 if [ -n "$$INSTDIR" ]; then
229 # As remove does not need the oxt file, this could potentially
230 # be done in the postinstall script as well.
232 # if this is an update, remove the old package instance first
233 if [ "$$1" != "upgrade" ]
249 echo "No tmp directory found!"
254 #Create the command which creates a temporary directory
255 if [ -x "/bin/mktemp" ]
257 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
259 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
263 if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
265 "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
268 if [ -n "$$INSTDIR" ]
288 echo "No tmp directory found!"
292 #Create the command which creates a temporary directory
293 if [ -x "/bin/mktemp" ]
295 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
297 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
301 if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then
302 "PRODUCTDIRECTORYNAME/program/unopkg" add --shared --bundled "PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
305 if [ -n "$$INSTDIR" ]
316 # if this is an update, just do nothing
318 if [ "$$1" = "upgrade" ]
334 echo "No tmp directory found!"
338 #Create the command which creates a temporary directory
339 if [ -x "/bin/mktemp" ]
341 INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
343 INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
347 if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
349 "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
352 if [ -n "$$INSTDIR" ]