Hi Rene, could you please review the attached patch for the libreoffice-3-3 branch?
It produces extra /etc/bash_completion_d/ooffice.sh for the compat stuff. It was the easiest and most safe solution. It generates exactly the same .sh files that I got by the previous builds here. It updates the Debian installation and split build. I was not able to test the Debian part. I just did my best :-) Best Regards, Petr
>From bb67090d8aae3c5fad16189fc30ce72e7bfc27d2 Mon Sep 17 00:00:00 2001 From: Petr Mladek <pmla...@suse.cz> Date: Wed, 19 Jan 2011 18:51:37 +0100 Subject: [PATCH] install bash completion for oo* wrappers when enabled (bnc#665402) --- bin/generate-bash-completion | 14 ++++++++++++++ bin/package-ooo | 7 +++++++ bin/piece/file-list-postprocess | 8 ++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/bin/generate-bash-completion b/bin/generate-bash-completion index 3eb5aea..25ae4e6 100755 --- a/bin/generate-bash-completion +++ b/bin/generate-bash-completion @@ -61,6 +61,7 @@ sub usage() print "Usage: $0 --help\n"; print " $0 [--binsuffix=suffix]\n"; + print "\t\t[--compat-oowrappers]\n"; print "\t\t[--office=wrapper_name]\n"; print "\t\t[--master=wrapper_name]\n"; print "\t\t[--base=wrapper_name]\n"; @@ -78,6 +79,7 @@ sub usage() print "Options:\n"; print "\t--help\t\tprint this help\n"; print "\t--binsuffix\tdefines a suffix that is added after each wrapper\n"; + print "\t--compat-oowrappers\tset wrapper names to the old default oo* wrapper names\n"; print "The other options allows to redefine the wrapper names.\n"; print "The value \"\" can be used to disable any wrapper.\n\n"; @@ -92,6 +94,18 @@ foreach my $arg (@ARGV) { if ( $arg =~ /--help/ ) { usage(); exit 0; + } elsif ( $arg =~ /--compat-oowrappers/ ) { + $APPS{'office'} = "ooffice"; + $APPS{'master'} = ""; + $APPS{'base'} = "oobase"; + $APPS{'calc'} = "oocalc"; + $APPS{'draw'} = "oodraw"; + $APPS{'impress'} = "ooimpress"; + $APPS{'math'} = "oomath"; + $APPS{'template'} = "oofromtemplate"; + $APPS{'unopkg'} = "unopkg"; + $APPS{'web'} = "ooweb"; + $APPS{'writer'} = "oowriter"; } elsif ( $arg =~ /--binsuffix=(.*)/ ) { $binsuffix = "$1"; } elsif ( $arg =~ /--office=(.*)/ ) { diff --git a/bin/package-ooo b/bin/package-ooo index 3d6b1a6..5da8c4a 100755 --- a/bin/package-ooo +++ b/bin/package-ooo @@ -127,6 +127,9 @@ fi # create bash completion mkdir -p $OODESTDIR/etc/bash_completion.d $TOOLSDIR/bin/generate-bash-completion --binsuffix="$BINSUFFIX" $TOOLSDIR/bin/bash-completion.in $OODESTDIR/etc/bash_completion.d/libreoffice${BINSUFFIX}.sh +if test "$COMPAT_OOWRAPPERS" = "YES" ; then + $TOOLSDIR/bin/generate-bash-completion --compat-oowrappers --binsuffix="$BINSUFFIX" $TOOLSDIR/bin/bash-completion.in $OODESTDIR/etc/bash_completion.d/ooffice${BINSUFFIX}.sh +fi if test "z$VENDORNAME" != "zRedHat"; then mkdir -p $MANDIR/man1 @@ -952,6 +955,10 @@ else mv usr/share/man/man1/libreoffice$BINSUFFIX.1 \ pkg/libreoffice-common/usr/share/man/man1 mkdir -p pkg/libreoffice-common/etc/bash_completion.d + if test "$COMPAT_OOWRAPPERS" = "YES" ; then + mv etc/bash_completion.d/ooffice$BINSUFFIX.sh \ + pkg/libreoffice-common/etc/bash_completion.d + fi mv etc/bash_completion.d/libreoffice$BINSUFFIX.sh \ pkg/libreoffice-common/etc/bash_completion.d mv .$OOINSTBASE/basis$VERSION/program/java-set-classpath \ diff --git a/bin/piece/file-list-postprocess b/bin/piece/file-list-postprocess index efe0d68..5c02cd0 100755 --- a/bin/piece/file-list-postprocess +++ b/bin/piece/file-list-postprocess @@ -24,8 +24,12 @@ fi # create bash completion mkdir -p $DESTDIR/etc/bash_completion.d -$OO_TOOLSDIR/generate-bash-completion --binsuffix="$BINSUFFIX" $OO_TOOLSDIR/bash-completion.in $DESTDIR/etc/bash_completion.d/ooffice${BINSUFFIX}.sh || exit 1; -echo /etc/bash_completion.d/ooffice${BINSUFFIX}.sh >>files-$piece.txt +$OO_TOOLSDIR/generate-bash-completion --binsuffix="$BINSUFFIX" $OO_TOOLSDIR/bash-completion.in $DESTDIR/etc/bash_completion.d/libreoffice${BINSUFFIX}.sh || exit 1; +echo /etc/bash_completion.d/libreoffice${BINSUFFIX}.sh >>files-$piece.txt +if test "$COMPAT_OOWRAPPERS" == 'YES' ; then + $OO_TOOLSDIR/generate-bash-completion --compat-oowrappers --binsuffix="$BINSUFFIX" $OO_TOOLSDIR/bash-completion.in $DESTDIR/etc/bash_completion.d/ooffice${BINSUFFIX}.sh || exit 1; + echo /etc/bash_completion.d/ooffice${BINSUFFIX}.sh >>files-$piece.txt +fi echo "Installing $OO_INSTDIR/basis$VERSION/program/java-set-classpath" sed -e "s|@OOINSTBASE@|$OO_INSTDIR|g" $OO_TOOLSDIR/java-set-classpath.in >$DESTDIR$OO_INSTDIR/basis$VERSION/program/java-set-classpath || exit 1; -- 1.7.3.4
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice