summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-08-23 19:23:13 +0200
committerPetr Mladek <pmladek@suse.cz>2011-08-23 20:28:59 +0200
commit484b5d7406831f410400d2aa9563cf5847590a12 (patch)
tree544fbc9265b96d4fd26a5b987e767849089703da /bin
parent1fceff3d256930815096b5c1267c3bf4dcb16226 (diff)
use /usr/bin/libreoffice symlink
it is used by UNO to find the installed LO
Diffstat (limited to 'bin')
-rwxr-xr-xbin/distro-install-desktop-integration21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
index e4dd872ab7a3..1cb2c4215b09 100755
--- a/bin/distro-install-desktop-integration
+++ b/bin/distro-install-desktop-integration
@@ -11,12 +11,25 @@ create_wrapper()
{
echo "Install $PREFIXDIR/bin/$1"
- mkdir -p $DESTDIR$PREFIXDIR/bin
- cat <<EOT >$DESTDIR$PREFIXDIR/bin/$1
+ if test -L "$DESTDIR$PREFIXDIR/bin/$1" ; then
+ # do not overwrite /usr/bin/libreoffice symlink created by create_tree.sh
+ # the symlink is necessary by java UNO components to find
+ # the UNO installation using $PATH; this function used to be provided
+ # by /usr/bin/soffice symlink, see
+ # http://udk.openoffice.org/common/man/spec/transparentofficecomponents.html
+ # Note: if you want to support parallel installation of more OOo versions
+ # you cannot include this link directly into the package
+ # For example, the Novell package mark this symlink as %ghost
+ # and update it in %post and %postun
+ echo " skip already existing symlink $PREFIXDIR/bin/$1"
+ else
+ mkdir -p $DESTDIR$PREFIXDIR/bin
+ cat <<EOT >$DESTDIR$PREFIXDIR/bin/$1
#!/bin/sh
$INSTALLDIR/program/$2 $3 "\$@"
EOT
- chmod 755 $DESTDIR$PREFIXDIR/bin/$1
+ chmod 755 $DESTDIR$PREFIXDIR/bin/$1
+ fi
# put into file list
test -f "$DESTDIR/$4" && echo "$PREFIXDIR/bin/$1" >>$DESTDIR/$4
}
@@ -105,7 +118,7 @@ cd -
rm -rf $sysui_temp
# we do not want some stuff from the plain packages
-rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME*
+rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME-printeradmin
rm -f $DESTDIR/usr/share/applications/libreoffice-javafilter.desktop
rm -f $DESTDIR/usr/share/applications/libreoffice-printeradmin.desktop
if test -d $DESTDIR/opt ; then