Version 1.9 :
[macros-openoffice.git] / auf-poste-client-reflets / debian / prerm
index c90d2d0..be14bad 100644 (file)
@@ -10,10 +10,20 @@ remove_extension() {
   if /usr/lib/openoffice/program/unopkg list --shared $1 >/dev/null; then
     echo -n "Removing extension $1..."
     INSTDIR=`mktemp -d`
-    /usr/lib/openoffice/program/unopkg remove --shared $1 \
-      "-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"
+    if test -d "/usr/lib/openoffice/basis3.1"
+    then
+      export PYTHONPATH="/usr/lib/openoffice/basis3.1/program"
+      basis=`readlink /usr/lib/openoffice/basis-link`
+      /usr/lib/openoffice/program/unopkg remove --shared $1 \
+        "-env:UserInstallation=file://$INSTDIR" \
+        "-env:UNO_JAVA_JFW_INSTALL_DATA=file:///var/lib/openoffice/$basis/share/config/javasettingsunopkginstall.xml" \
+        "-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
+    else
+      /usr/lib/openoffice/program/unopkg remove --shared $1 \
+        "-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"
+    fi
     if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi
     echo " done."
     flush_unopkg_cache