Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

are you fine with adding the attached changes into master and
libreoffice-3-4 branch?

These changes help me to create SUSE packages. Most of the stuff comes
from the build repo and should be useful for other packagers as well.

The changes should be pretty safe. Most scripts are called only with the
new target "make distro-pack-install". In addition, it adds few more
configure switches and environment variables. See the commit messages
for more details.

Note that I did not migrated all features from the build repo. I wanted
to do some clean up during this more, ... We could add them later is
really needed.

I tested it only with vendor "Novell, inc." I am sure that there will be
problems with other vendors. IMHO, it should not cause harm because it
affects only few interested package maintainers. They should be able to
fix problems and send patches.


Best Regards,
Petr
From c7e4682f8f421dfb08edfbd517f2af445af0fe9d Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.cz>
Date: Fri, 8 Jul 2011 11:54:23 +0200
Subject: [PATCH 1/3] bin/unpack-sources: new helper script for packaging LO

move the source tarball unpacking from "download" into a separate
script that could be called offline during LO packaging
---
 bin/unpack-sources |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 download           |    9 +----
 2 files changed, 106 insertions(+), 8 deletions(-)
 create mode 100755 bin/unpack-sources

diff --git a/bin/unpack-sources b/bin/unpack-sources
new file mode 100755
index 0000000..153b3ec
--- /dev/null
+++ b/bin/unpack-sources
@@ -0,0 +1,105 @@
+#!/usr/bin/env bash
+
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+#       Petr Mladek <pmladek@suse.cz>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s): 
+# Ted <ted@bear.com>
+# Portions created by the Ted are Copyright (C) 2010 Ted. All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+usage()
+{
+    echo "Helper script to unpack the LO source tarbals"
+    echo
+    echo "Usage: ${0##*/} [--help] start-dir tarball..."
+    echo
+    echo "Options:"
+    echo
+    echo "     --help           this help"
+    echo "     start-dir        path where the sources are unpacked (bootstrap directory)"
+    echo "      tarball          list of LO source tarball that need to be unpacked"
+}
+
+start_dir=
+tarballs=
+
+while test -n "$1" ; do
+    case "$1" in
+       --help)
+           usage
+           exit 0;
+           ;;
+       --download)
+           download="yes"
+           ;;
+       -*)
+           echo "Error: unknown option: $1"
+           exit 1;
+           ;;
+       *)
+           if test -z "$start_dir" ; then
+               start_dir="$1"
+           else
+               tarballs="$tarballs $1"
+           fi
+           ;;
+    esac
+    shift
+done
+
+if test -z "$start_dir" ; then
+    echo "Error: Please, define where to unpack sources, try --help"
+fi
+
+if ! test -d $start_dir/src -a -f $start_dir/solenv/inc/target.mk ; then
+    echo "Error: $start_dir is not a valid bootstrap directory"
+    exit 1;
+fi
+
+if test ! -f $start_dir/bootstrap.ver -o -d $start_dir/.git ; then
+    echo "Warning: bootstrap sources are from git and not from tarball"
+    echo "         Do nothing."
+    exit 0;
+fi
+
+source $start_dir/bootstrap.ver
+lo_src_dir="$start_dir/src"
+mkdir -p "$lo_src_dir"
+
+for tarball in $tarballs ; do
+    tarname=`basename $tarball | sed -e "s/.tar.bz2//"`
+    if test -d $lo_src_dir/$tarname ; then
+        echo "Warning: $lo_src_dir/$tarname already exists => skipping"
+        continue;
+    fi
+
+    echo "Unpacking $tarname..."
+    tar -xjf "$tarball" -C "$lo_src_dir"
+
+    # create symlinks
+    for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -printf 
"$tarname/%f\n"` ; do
+        ln -sf "src/$dir" "$start_dir"
+    done
+done
diff --git a/download b/download
index e2c209e..a322936 100755
--- a/download
+++ b/download
@@ -212,14 +212,7 @@ if [ -f $start_dir/bootstrap.ver -a ! -d $start_dir/.git ] ; then
         if [ ! -f "$TARFILE_LOCATION/$tarname.tar.bz2" ] ; then
            downloaditem "http://download.documentfoundation.org/libreoffice/src/"; 
"$tarname.tar.bz2" ""
        fi
-       if [ ! -d $lo_src_dir/$tarname ] ; then
-           echo "Unpacking $tarname.tar.bz2..."
-           tar -xf "$TARFILE_LOCATION/$tarname.tar.bz2" -C "$lo_src_dir"
-       fi
-       # create symlinks
-       for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d` ; do
-           ln -sf "$dir" "$start_dir"
-       done
+       $start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.bz2
     done
 fi
 
-- 
1.7.3.4

From 62366138b443e173788867c49fd267d486cedeac Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.cz>
Date: Fri, 8 Jul 2011 11:58:10 +0200
Subject: [PATCH 2/3] add distro-configs/SUSE-*.conf

---
 distro-configs/SUSE-10.1.conf |   32 +++++++++++++++++++++++
 distro-configs/SUSE-11.1.conf |   57 +++++++++++++++++++++++++++++++++++++++++
 distro-configs/SUSE-11.2.conf |   41 +++++++++++++++++++++++++++++
 distro-configs/SUSE-11.3.conf |   40 ++++++++++++++++++++++++++++
 distro-configs/SUSE-11.4.conf |   40 ++++++++++++++++++++++++++++
 distro-configs/SUSE.conf      |   40 ++++++++++++++++++++++++++++
 6 files changed, 250 insertions(+), 0 deletions(-)
 create mode 100644 distro-configs/SUSE-10.1.conf
 create mode 100644 distro-configs/SUSE-11.1.conf
 create mode 100644 distro-configs/SUSE-11.2.conf
 create mode 100644 distro-configs/SUSE-11.3.conf
 create mode 100644 distro-configs/SUSE-11.4.conf
 create mode 100644 distro-configs/SUSE.conf

diff --git a/distro-configs/SUSE-10.1.conf b/distro-configs/SUSE-10.1.conf
new file mode 100644
index 0000000..abd5c7f
--- /dev/null
+++ b/distro-configs/SUSE-10.1.conf
@@ -0,0 +1,32 @@
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-dbus
+--disable-kde4
+--disable-odk
+--enable-gnome-vfs
+--enable-hids
+--enable-lockdown
+--enable-mono
+--enable-quickstart
+--enable-opengl
+--enable-ogltrans
+--with-ant-home=/usr
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries
+--with-external-thes-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries
+--with-jdk-home=$JAVA_HOME
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-libxslt
+--with-system-mozilla=xulrunner
+--with-system-neon
+--with-system-odbc-headers
+--with-xulrunner
+--without-junit
+--without-myspell-dicts
+--without-system-poppler
+--without-system-mesa-headers
+--without-stlport
diff --git a/distro-configs/SUSE-11.1.conf b/distro-configs/SUSE-11.1.conf
new file mode 100644
index 0000000..3384434
--- /dev/null
+++ b/distro-configs/SUSE-11.1.conf
@@ -0,0 +1,57 @@
+--disable-epm
+--with-openldap
+--without-fonts
+--with-system-jpeg
+--with-system-libxml
+--with-system-mozilla
+--with-system-openssl
+--with-system-python
+--with-system-stdlibs
+--with-system-zlib
+--with-system-poppler
+--enable-evolution2
+--enable-dbus
+--with-alloc=system
+
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-hids
+--enable-lockdown
+--enable-ext-presenter-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-ext-pdfimport
+--enable-ext-presenter-console
+--enable-ext-report-builder
+--enable-ext-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-cppunit
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
+--without-junit
diff --git a/distro-configs/SUSE-11.2.conf b/distro-configs/SUSE-11.2.conf
new file mode 100644
index 0000000..a95f187
--- /dev/null
+++ b/distro-configs/SUSE-11.2.conf
@@ -0,0 +1,41 @@
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-hids
+--enable-lockdown
+--enable-ext-presenter-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-ext-pdfimport
+--enable-ext-presenter-console
+--enable-ext-report-builder
+--enable-ext-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
+--without-junit
diff --git a/distro-configs/SUSE-11.3.conf b/distro-configs/SUSE-11.3.conf
new file mode 100644
index 0000000..564d6ba
--- /dev/null
+++ b/distro-configs/SUSE-11.3.conf
@@ -0,0 +1,40 @@
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-hids
+--enable-lockdown
+--enable-ext-presenter-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-ext-pdfimport
+--enable-ext-presenter-console
+--enable-ext-report-builder
+--enable-ext-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
diff --git a/distro-configs/SUSE-11.4.conf b/distro-configs/SUSE-11.4.conf
new file mode 100644
index 0000000..564d6ba
--- /dev/null
+++ b/distro-configs/SUSE-11.4.conf
@@ -0,0 +1,40 @@
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-hids
+--enable-lockdown
+--enable-ext-presenter-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-ext-pdfimport
+--enable-ext-presenter-console
+--enable-ext-report-builder
+--enable-ext-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
diff --git a/distro-configs/SUSE.conf b/distro-configs/SUSE.conf
new file mode 100644
index 0000000..564d6ba
--- /dev/null
+++ b/distro-configs/SUSE.conf
@@ -0,0 +1,40 @@
+--with-vendor=Novell, Inc.
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-hids
+--enable-lockdown
+--enable-ext-presenter-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-ext-pdfimport
+--enable-ext-presenter-console
+--enable-ext-report-builder
+--enable-ext-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
-- 
1.7.3.4

From 679b9451ce24b7a2ca8429598e38489f07f10950 Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.cz>
Date: Fri, 8 Jul 2011 12:01:56 +0200
Subject: [PATCH 3/3] better support for distro packaging

This is port from the build repo. The main differences are:

    + splits package-ooo into several scripts (bin/distro-install-*)

    + renames many variables to avoid OOO prefix and to better fit
      the variables produced by the current bootstrap configure.in

    + uses OOO_VENDOR from bootstrap/configure.in to add distro specific hacks;
      the conditions have been updated only for "Novell, inc."

    + install most of the desktop integration from sysui using
      sysui/desktop/share/create_tree.sh

    + do not install two extra templates:

         $OOINSTBASE/basis$VERSION/share/template/en-US/forms/resume.ott
         $OOINSTBASE/basis$VERSION/share/template/en-US/officorr/project-proposal.ott

      should get merged with other templates

    + do not install pyunorc-update64;

      it is needed only when you want to run 32-bit LO on 64-bit system;
      is anyone using it?

    + do not call install-dictionaries:
    + do not call build-galleries:

      is anyone using them?

    + do not install ootool and ooconfig

      is anyone using them? are they still working?
---
 Makefile.in                            |   12 +-
 bin/bash-completion.in                 |   90 +++++
 bin/distro-install-clean-up            |   89 +++++
 bin/distro-install-desktop-integration |  180 +++++++++++
 bin/distro-install-file-lists          |  555 ++++++++++++++++++++++++++++++++
 bin/distro-install-sdk                 |   86 +++++
 bin/generate-bash-completion           |  234 ++++++++++++++
 bin/java-set-classpath.in              |   64 ++++
 configure.in                           |   97 ++++++-
 set_soenv.in                           |   15 +-
 10 files changed, 1413 insertions(+), 9 deletions(-)
 create mode 100644 bin/bash-completion.in
 create mode 100755 bin/distro-install-clean-up
 create mode 100755 bin/distro-install-desktop-integration
 create mode 100755 bin/distro-install-file-lists
 create mode 100755 bin/distro-install-sdk
 create mode 100755 bin/generate-bash-completion
 create mode 100644 bin/java-set-classpath.in

diff --git a/Makefile.in b/Makefile.in
index ced0ed2..128b2d6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,11 +20,17 @@ all: Makefile dmake/dmake@EXEEXT@ src.downloaded
 
 install:
        @. ./*[Ee]nv.[Ss]et.sh && \
-       echo "Installing in $${libdir:-@libdir@}/@INSTALL_DIRNAME@..." && \
-       ooinstall "$${libdir:-@libdir@}/@INSTALL_DIRNAME@" && \
+       echo "Installing in @INSTALLDIR@..." && \
+       ooinstall "@INSTALLDIR@" && \
        echo "" && \
        echo "Installation finished, you can now execute:" && \
-       echo "$${libdir:-@libdir@}/@INSTALL_DIRNAME@/program/soffice"
+       echo "@INSTALLDIR@/program/soffice"
+
+distro-pack-install: install
+       ./bin/distro-install-clean-up
+       ./bin/distro-install-desktop-integration
+       ./bin/distro-install-sdk
+       ./bin/distro-install-file-lists
 
 dev-install:
        @. ./*[Ee]nv.[Ss]et.sh && \
diff --git a/bin/bash-completion.in b/bin/bash-completion.in
new file mode 100644
index 0000000..77087c5
--- /dev/null
+++ b/bin/bash-completion.in
@@ -0,0 +1,90 @@
+# Programmable bash_completion file for the main office applications
+# It is based on /etc/profile.d/complete.bash from SUSE Linux 10.1
+
+_def=; _dir=; _file=; _nosp=
+if complete -o default _nullcommand &> /dev/null ; then
+    _def="-o default"
+    _dir="-o dirnames"
+    _file="-o filenames"
+fi
+_minusdd="-d ${_dir}"
+_minusdf="-d ${_file}"
+if complete -o nospace _nullcommand &> /dev/null ; then
+    _nosp="-o nospace"
+    _minusdd="${_nosp} ${_dir}"
+    _minusdf="${_nosp} ${_dir}"
+fi
+complete -r _nullcommand &> /dev/null
+
+# General expanding shell function
+@OFFICE_SHELL_FUNCTION@ ()
+{
+    # bash `complete' is broken because you can not combine
+    # -d, -f, and -X pattern without missing directories.
+    local c=${COMP_WORDS[COMP_CWORD]}
+    local a="${COMP_LINE}"
+    local e s g=0 cd dc t=""
+    local IFS
+
+    shopt -q extglob && g=1
+    test $g -eq 0 && shopt -s extglob
+    # Don't be fooled by the bash parser if extglob is off by default
+    cd='*-?(c)d*'
+    dc='*-d?(c)*'
+
+    case "${1##*/}" in
+@BASH_COMPLETION_SUFFIXES_CHECKS@
+    *)                 e='!*'
+    esac
+
+    case "$(complete -p ${1##*/} 2> /dev/null)" in
+       *-d*)   ;;
+       *) s="-S/"
+    esac
+
+    IFS='
+'
+    case "$c" in
+    \$\(*\))      eval COMPREPLY=\(${c}\) ;;
+    \$\(*)             COMPREPLY=($(compgen -c -P '$(' -S ')'  -- ${c#??}))    ;;
+    \`*\`)        eval COMPREPLY=\(${c}\) ;;
+    \`*)               COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?}))     ;;
+    \$\{*\})      eval COMPREPLY=\(${c}\) ;;
+    \$\{*)             COMPREPLY=($(compgen -v -P '${' -S '}'  -- ${c#??}))    ;;
+    \$*)               COMPREPLY=($(compgen -v -P '$'          -- ${c#?}))     ;;
+    \~*/*)             COMPREPLY=($(compgen -f -X "$e"         -- ${c}))       ;;
+    \~*)               COMPREPLY=($(compgen -u ${s}            -- ${c}))       ;;
+    *@*)               COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;;
+    *[*?[]*)           COMPREPLY=($(compgen -G "${c}"))                        ;;
+    *[?*+\!@]\(*\)*)
+       if test $g -eq 0 ; then
+                       COMPREPLY=($(compgen -f -X "$e" -- $c))
+                       test $g -eq 0 && shopt -u extglob
+                       return
+       fi
+                       COMPREPLY=($(compgen -G "${c}"))                        ;;
+    *)
+       if test "$c" = ".." ; then
+                       COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c))
+       else
+                       for s in $(compgen -f -X "$e" -- $c) ; do
+                           if test -d $s ; then
+                               COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s))
+                           elif test -z "$t" ; then
+                               COMPREPLY=(${COMPREPLY[@]} $s)
+                           else
+                               case "$(file -b $s 2> /dev/null)" in
+                               $t) COMPREPLY=(${COMPREPLY[@]} $s)              ;;
+                               esac
+                           fi
+                       done
+       fi                                                                      ;;
+    esac
+    test $g -eq 0 && shopt -u extglob
+}
+
+
+complete -d -X '.[^./]*' -F @OFFICE_SHELL_FUNCTION@ ${_file} \
+@BASH_COMPLETION_OOO_APPS@
+
+unset _def _dir _file _nosp _minusdd _minusdf
diff --git a/bin/distro-install-clean-up b/bin/distro-install-clean-up
new file mode 100755
index 0000000..7283bb9
--- /dev/null
+++ b/bin/distro-install-clean-up
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+echo "Cleaning up ...";
+
+remove_help_localization()
+{
+    lang=$1
+
+    # nothing to be done if the localization is en-US if it does not exist
+    # or if it is already removed
+    test "$lang" = "en-US" -o \
+          ! -e $DESTDIR$INSTALLDIR/help/$lang -o \
+         -L $DESTDIR$INSTALLDIR/help/$lang && return;
+
+    echo "... remove \"$lang\""
+
+    rm -rf $DESTDIR$INSTALLDIR/help/$lang
+    grep -v "$INSTALLDIR/help/$lang" $DESTDIR/gid_Module_Root.$lang 
$DESTDIR/gid_Module_Root.$lang.new
+    mv -f $DESTDIR/gid_Module_Root.$lang.new $DESTDIR/gid_Module_Root.$lang
+    # FIXME: the following code could be used without the condition
+    #        and should replace the lines above after only the milestones
+    #       providing gid_Module_Helppack_Help and fixed gid_Module_Root.$lang
+    #        are supported
+    # Note: The problem with gid_Module_Root.$lang is that it still includes
+    #       %dir */help/* entries.
+    # Note: It was still necessary on ppc with gcj (OOo-2.0.2). Strange. Have to
+    # investigate it later.
+    if test -f $DESTDIR/gid_Module_Helppack_Help.$lang ; then
+       grep -v "$INSTALLDIR/help/$lang" $DESTDIR/gid_Module_Helppack_Help.$lang 
$DESTDIR/gid_Module_Helppack_Help.$lang.new
+       mv -f $DESTDIR/gid_Module_Helppack_Help.$lang.new $DESTDIR/gid_Module_Helppack_Help.$lang
+    fi
+
+    # Note: We created a compat symlink in the past. It is no longer necessary.
+    # We do not want it because RPM has problems with update when we remove
+    # poor localizations in never packages
+}
+
+# Check if the English help is installed and is in the main package (is first on the list)
+# Note that Java-disabled builds do not create help at all.
+if test -f $DESTDIR$INSTALLDIR/help/en/sbasic.cfg -a \
+        "`for lang in $WITH_LANG_LIST ; do echo $lang ; break ; done`" = "en-US" ; then
+
+    echo "Removing duplicated English help..."
+  
+    for lang in $WITH_LANG_LIST ; do
+       test ! -f $DESTDIR$INSTALLDIR/help/en/sbasic.cfg -o ! -f 
$DESTDIR$INSTALLDIR/help/$lang/sbasic.cfg && continue;
+       if diff $DESTDIR$INSTALLDIR/help/en/sbasic.cfg $DESTDIR$INSTALLDIR/help/$lang/sbasic.cfg 
/dev/null 2>&1 ; then
+           remove_help_localization $lang
+       fi
+    done
+    
+    echo "Removing poor help localizations..."
+
+    for lang in $WITH_POOR_HELP_LOCALIZATIONS ; do
+       remove_help_localization $lang
+    done
+fi
+
+echo "Fixing permissions..."
+for dir in $DOCDIR $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples ; do
+    if test -d $dir -a -w $dir ; then
+       find "$dir" -type f \( -name "*.txt" -o -name "*.java" -o -name "*.xml"    -o \
+                              -name "*.xcu" -o -name "*.xcs"  -o -name "*.html"   -o \
+                              -name "*.pdf" -o -name "*.ps"   -o -name "*.gif"    -o \
+                              -name "*.png" -o -name "*.jpg"  -o -name "Makefile" -o \
+                              -name "manifest.mf" \) -exec chmod 644 {} \;
+    fi
+done
+
+if test "z$DESTDIR" != "z" ; then
+    echo "Checking for DESTDIR inside installed files..."
+    found_destdir=
+    for file in `find $DESTDIR -type f` ; do
+       grep -q "$DESTDIR" $file && echo "$file: includes the string \"$DESTDIR\"" && 
found_destdir=1
+    done
+    if test "z$found_destdir" != "z" ; then
+       echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!"
+       echo "The path DESTDIR:$DESTDIR was found inside some"
+       echo "installed files. It is probably a bug."
+       echo 
+       echo "Especially, if the DESTDIR is set to \$RPM_BUILD_ROOT"
+       echo "when creating RPM packages. Even it could be a security hole"
+       echo "if the application searches /var/tmp for binaries or"
+       echo "config files because the directory is world-writable."
+       echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!"
+    fi
+fi
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
new file mode 100755
index 0000000..c00c8c6
--- /dev/null
+++ b/bin/distro-install-desktop-integration
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+PRODUCTVERSION_NODOT=`echo $PRODUCTVERSION | sed -e "s/\.//"`
+
+mkdir -p $DESTDIR$PREFIXDIR/bin
+
+
+create_wrapper()
+{
+    echo "Install $PREFIXDIR/bin/$1"
+
+    mkdir -p $DESTDIR$PREFIXDIR/bin
+    cat <<EOT >$DESTDIR$PREFIXDIR/bin/$1
+#!/bin/sh 
+$INSTALLDIR/program/$2 $3 "\$@"
+EOT
+    chmod 755 $DESTDIR$PREFIXDIR/bin/$1
+    # put into file list
+    test -f "$DESTDIR/$4" && echo "$PREFIXDIR/bin/$1" >>$DESTDIR/$4
+}
+
+create_man_link()
+{
+    echo "Install $MANDIR/man1/$1.1.gz"
+
+    mkdir -p $DESTDIR$MANDIR/man1
+    echo ".so man1/$2.1" >| $DESTDIR$MANDIR/man1/$1.1
+    gzip -f $DESTDIR$MANDIR/man1/$1.1
+    test -f "$DESTDIR/$3" && echo "$MANDIR/man1/$1.1.gz" >>"$DESTDIR/$3"
+}
+
+install_man()
+{
+    echo "Install $MANDIR/man1/$1.1.gz"
+
+    mkdir -p $DESTDIR$MANDIR/man1
+    cp sysui/desktop/man/$1.1 $DESTDIR$MANDIR/man1 || exit 1;
+    gzip -f $DESTDIR$MANDIR/man1/$1.1
+    test -f "$DESTDIR/$2" && echo "$MANDIR/man1/$1.1.gz" >>"$DESTDIR/$2"
+}
+
+
+add_wrapper()
+{
+    lowrapper_name="$1"
+    target_binary="$2"
+    target_option_1="$3"
+    used_man_page="$4"
+    desktop_file="$5"
+    file_list="$6"
+
+    # do we want compat oowrapper?
+    oowrapper_name=""
+    if test "$WITH_COMPAT_OOWRAPPERS" == 'YES' ; then
+        oowrapper_name=`echo "$lowrapper_name" | sed -e "s/^lo/oo/"`
+        # "oo" prefix only for wrappers stating with "lo" prefix
+        test "$oowrapper_name" = "$lowrapper_name" && oowrapper_name=
+    fi
+
+    # wrappers
+    create_wrapper "$lowrapper_name" "$target_binary" "$target_option_1" "$file_list"
+    test -n "$oowrapper_name" && create_wrapper "$oowrapper_name" "$target_binary" 
"$target_option_1" "$file_list"
+
+    # man pages
+    if test "$used_man_page" = "$lowrapper_name" ; then
+        # need to install the manual page
+        install_man "$lowrapper_name" "$file_list"
+    else
+        # just link the manual page
+        create_man_link "$lowrapper_name" "$used_man_page" "$file_list"
+    fi
+    test -n "$oowrapper_name" && create_man_link "$oowrapper_name" "$used_man_page" "$file_list"
+    
+    # add desktop file to the right file list
+    test -n "$desktop_file" -a -f "$DESTDIR/$file_list" && echo 
"/usr/share/applications/$desktop_file" >>"$DESTDIR/$file_list"
+}
+
+# install desktop integration from plain packages
+sysui_temp=`mktemp -d /tmp/distro-pack-desktop-integration-XXXXXX`
+cp -a sysui/unxlng*/misc/libreoffice/* "$sysui_temp"
+cp -a sysui/desktop/share/create_tree.sh "$sysui_temp"
+builddir=`pwd`
+cd $sysui_temp
+# we want non-versioned stuff in the distro packages
+for file in * ; do
+    sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+        -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+        -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+        "$file" >"$file.new"
+    mv "$file.new" "$file"
+done
+# call in subshell to do not malfrom PRODUCTVERSION, ...
+(
+    export OFFICE_PREFIX=$LIBDIR
+    export PREFIX=$INSTALLDIRNAME
+    export ICON_PREFIX=$INSTALLDIRNAME
+    export ICON_SOURCE_DIR=$builddir/sysui/desktop/icons
+    export PRODUCTVERSION=
+    export KDEMAINDIR=/usr
+    export GNOMEDIR=/usr
+    export GNOME_MIME_THEME=hicolor
+    /bin/bash ./create_tree.sh
+)
+cd -
+rm -rf $sysui_temp
+
+# we do not want some stuff from the plain packages
+rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME*
+rm -f $DESTDIR/usr/share/applications/libreoffice-javafilter.desktop
+rm -f $DESTDIR/usr/share/applications/libreoffice-printeradmin.desktop
+if test -d $DESTDIR/opt ; then 
+    rm -f $DESTDIR/opt/$INSTALLDIRNAME
+    rmdir --ignore-fail-on-non-empty $DESTDIR/opt
+fi
+
+# we want non-versioned desktop files
+cd $DESTDIR/$INSTALLDIR/share/xdg
+# we want non-versioned stuff in the distro packages
+for file in *.desktop ; do
+    sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+        -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+        -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+        "$file" >"$file.new"
+    mv "$file.new" "$file"
+done
+cd -
+
+# put the stuff installed by create_tree.sh into the right file lists
+# desktop files will be added by the corresponding add_wrapper command
+if test -f $DESTDIR/gid_Module_Root_Brand ; then
+    for dir in /usr/share/application-registry \
+               /usr/share/mimelnk/application \
+               /usr/share/mime/packages \
+               /usr/share/mime-info \
+               /usr/share/icons ; do
+        find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" 
$DESTDIR/gid_Module_Root_Brand
+    done
+fi
+
+# wrappers and man pages
+# FIXME: do not have desktop file and MIME icon for unopkg
+add_wrapper lobase         soffice "--base"       "libreoffice" "libreoffice-base.desktop"        
"gid_Module_Brand_Prg_Base"
+add_wrapper localc         soffice "--calc"       "libreoffice" "libreoffice-calc.desktop"        
"gid_Module_Brand_Prg_Calc"
+add_wrapper lodraw         soffice "--draw"       "libreoffice" "libreoffice-draw.desktop"        
"gid_Module_Brand_Prg_Draw"
+add_wrapper lomath         soffice "--math"       "libreoffice" "libreoffice-math.desktop"        
"gid_Module_Brand_Prg_Math"
+add_wrapper loimpress      soffice "--impress"    "libreoffice" "libreoffice-impress.desktop"     
"gid_Module_Brand_Prg_Impress"
+add_wrapper loweb          soffice "--web"        "libreoffice" ""                                
"gid_Module_Brand_Prg_Wrt"
+add_wrapper lowriter       soffice "--writer"     "libreoffice" "libreoffice-writer.desktop"      
"gid_Module_Brand_Prg_Wrt"
+add_wrapper lofromtemplate soffice ".uno:NewDoc" "libreoffice" "libreoffice-base.desktop"        
"gid_Module_Root_Brand"
+add_wrapper libreoffice    soffice ""            "libreoffice" "libreoffice-startcenter.desktop" 
"gid_Module_Root_Brand"
+add_wrapper loffice        soffice ""            "libreoffice" ""                                
"gid_Module_Root_Brand"
+add_wrapper unopkg         unopkg  ""            "unopkg"      ""                                
"gid_Module_Root_Brand"
+
+# /usr/bin/ooffice symlink is necessary by java UNO components to find
+# the UNO installation using $PATH, 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
+ln -sf $INSTALLDIR/program/soffice $PREFIXDIR/bin/soffice
+
+# create bash completion
+mkdir -p $DESTDIR/etc/bash_completion.d
+./bin/generate-bash-completion bin/bash-completion.in 
$DESTDIR/etc/bash_completion.d/$INSTALLDIRNAME.sh
+test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/$INSTALLDIRNAME.sh" 
$DESTDIR/gid_Module_Root_Brand
+if test "$WITH_COMPAT_OOWRAPPERS" = "YES" ; then
+    ./bin/generate-bash-completion --compat-oowrappers bin/bash-completion.in 
$DESTDIR/etc/bash_completion.d/ooffice.sh
+    test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/ooffice.sh" 
$DESTDIR/gid_Module_Root_Brand
+fi
+
+echo "Install $OOINSTDIR/basis$VERSION/program/java-set-classpath";
+mkdir -p $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program
+sed -e "s|@INSTALLDIR@|$INSTALLDIR|g" bin/java-set-classpath.in >| 
"$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath" || exit 1;
+chmod 755 "$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath"
+test -f $DESTDIR/gid_Module_Root_Brand && echo 
"$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath" >>$DESTDIR/gid_Module_Root_Brand
+
+exit 0
\ No newline at end of file
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
new file mode 100755
index 0000000..fbd4d1c
--- /dev/null
+++ b/bin/distro-install-file-lists
@@ -0,0 +1,555 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+BUILDDIR=`pwd`
+FILELISTSDIR="$BUILDDIR/file-lists"
+
+# remove installed file even from the file list
+# Params: file_list file_to_remove
+remove_file()
+{
+    rm -f "$DESTDIR/$2"
+    perl -pi -e "s|^$2$||" "$1"
+}
+
+# move one file from one list of files to a second one
+# Params: target_file_list source_file_list file_to_move
+mv_file_between_flists()
+{
+    if grep "^$3\$" $2 >/dev/null 2>&1 ; then
+        # \$3 can be regular expression
+        grep "^$3\$" $2 >>$1
+        perl -pi -e "s|^$3$||" $2
+    fi
+}
+# add the directories from the source list of files to the target list of
+# file which are used in the target list of files but are missing there
+# Params: target_file_list source_file_list
+add_used_directories()
+{
+    sort -u -r $2 | sed -n "s|^%dir \(.*\)\$|s%^\\\\(\1\\\\).*%\\\\1%p|p" >$2.pattern
+    sed -n -f $2.pattern $1 | sort -u | sed "s|^|%dir |" >>$1
+    rm $2.pattern
+    sort -u $1 >$1.unique
+    mv $1.unique $1
+}
+
+# remove a duplicity between two filelist
+# Params: filelist_with_original filelist_with_duplicity duplicit_path
+remove_duplicity_from_flists()
+{
+    if grep "$3" "$1" >/dev/null 2>&1 && \
+        grep "$3" "$2" >/dev/null 2>&1 ; then
+        perl -pi -e "s|^$3$||" $2
+    fi
+}
+
+# merges one file list into another one
+# Params: source_filelist dest_filelist replace_dest
+merge_flists()
+{
+    if test -f "$1" ; then
+        cat "$1" >>"$2"
+        sort -u "$2" >"$2".sorted
+        mv "$2".sorted "$2"
+    fi
+}
+
+if ! test -f $DESTDIR/gid_Module_Root; then
+    echo "Error: Failed to generate package file lists";
+    echo "       Have you defined DESTDIR?"
+    exit 1;
+fi
+
+
+rm -rf "$FILELISTSDIR"
+mkdir -p "$FILELISTSDIR"
+
+cd $DESTDIR
+
+if test "z$OOO_VENDOR" != "zDebian" ; then
+
+    echo "Generating package file lists for $OOO_VENDOR..."
+
+    rm -f common_list.txt
+    for module in gid_Module_Root gid_Module_Root_Brand \
+        gid_Module_Root_Files_Images \
+        gid_Module_Root_Files_[0-9] \
+        gid_Module_Root_Hack \
+        gid_Module_Oo_Linguistic \
+        gid_Module_Root_Ure_Hidden ; do
+        merge_flists $module $FILELISTSDIR/common_list.txt
+    done
+
+    if test "$SPLIT_APP_MODULES" = "YES" ; then
+        merge_flists gid_Module_Prg_Base_Bin      $FILELISTSDIR/base_list.txt
+        merge_flists gid_Module_Prg_Calc_Bin      $FILELISTSDIR/calc_list.txt
+        merge_flists gid_Module_Prg_Draw_Bin      $FILELISTSDIR/draw_list.txt
+        merge_flists gid_Module_Prg_Math_Bin      $FILELISTSDIR/math_list.txt
+        merge_flists gid_Module_Prg_Impress_Bin   $FILELISTSDIR/impress_list.txt
+        merge_flists gid_Module_Prg_Wrt_Bin       $FILELISTSDIR/writer_list.txt
+        merge_flists gid_Module_Brand_Prg_Base    $FILELISTSDIR/base_list.txt
+        merge_flists gid_Module_Brand_Prg_Calc    $FILELISTSDIR/calc_list.txt
+        merge_flists gid_Module_Brand_Prg_Draw    $FILELISTSDIR/draw_list.txt
+        merge_flists gid_Module_Brand_Prg_Math    $FILELISTSDIR/math_list.txt
+        merge_flists gid_Module_Brand_Prg_Impress $FILELISTSDIR/impress_list.txt
+        merge_flists gid_Module_Brand_Prg_Wrt     $FILELISTSDIR/writer_list.txt
+        # FIXME: small; low dependencies; why optional module?
+        merge_flists gid_Module_Optional_OGLTrans $FILELISTSDIR/impress_list.txt
+    else
+        merge_flists gid_Module_Prg_Base_Bin      $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Prg_Calc_Bin      $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Prg_Draw_Bin      $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Prg_Math_Bin      $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Prg_Impress_Bin   $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Prg_Wrt_Bin       $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Base    $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Calc    $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Draw    $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Math    $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Impress $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Brand_Prg_Wrt     $FILELISTSDIR/common_list.txt
+        # FIXME: small; low dependencies; why optional module?
+        merge_flists gid_Module_Optional_OGLTrans $FILELISTSDIR/common_list.txt
+    fi
+
+    if test "$SPLIT_OPT_FEATURES" = "YES" ; then
+        if test "z$OOO_VENDOR" = "zMandriva" ; then
+            merge_flists gid_Module_Optional_Binfilter         
$FILELISTSDIR/filter-binfilter_list.txt
+            merge_flists gid_Module_Langpack_Binfilter_en_US   
$FILELISTSDIR/filter-binfilter_list.txt
+            merge_flists gid_Module_Optional_Grfflt            $FILELISTSDIR/draw_list.txt
+            merge_flists gid_Module_Optional_Headless          $FILELISTSDIR/common_list.txt
+            merge_flists gid_Module_Optional_Javafilter        $FILELISTSDIR/common_list.txt
+            merge_flists gid_Module_Optional_Pymailmerge       $FILELISTSDIR/pyuno_list.txt
+            merge_flists gid_Module_Optional_Pyuno             $FILELISTSDIR/pyuno_list.txt
+            merge_flists gid_Module_Optional_Testtool          $FILELISTSDIR/testtool_list.txt
+            merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
+        else
+            merge_flists gid_Module_Optional_Binfilter         $FILELISTSDIR/filters_list.txt
+            merge_flists gid_Module_Optional_Grfflt            $FILELISTSDIR/common_list.txt
+            merge_flists gid_Module_Optional_Headless          $FILELISTSDIR/common_list.txt
+            merge_flists gid_Module_Optional_Javafilter        $FILELISTSDIR/filters_list.txt
+            merge_flists gid_Module_Optional_Pymailmerge       $FILELISTSDIR/mailmerge_list.txt
+            merge_flists gid_Module_Optional_Pyuno             $FILELISTSDIR/pyuno_list.txt
+            merge_flists gid_Module_Optional_Testtool          $FILELISTSDIR/testtool_list.txt
+            merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/filters_list.txt
+        fi
+    else
+        merge_flists gid_Module_Optional_Binfilter         $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Langpack_Binfilter         $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Grfflt            $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Headless          $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Javafilter        $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Pymailmerge       $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Pyuno             $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Testtool          $FILELISTSDIR/common_list.txt
+        merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
+    fi
+
+    # lang packs
+    for lang in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
+        lang_lists=
+        if test "$OOO_VENDOR" = "Mandriva" -o \( "$OOO_VENDOR" = "Novell, Inc." -a 
"$SPLIT_APP_MODULES" = "YES" \) ; then
+            test -f gid_Module_Langpack_Basis_$lang     && lang_lists="$lang_lists 
gid_Module_Langpack_Basis_$lang" || :
+            test -f gid_Module_Langpack_Brand_$lang     && lang_lists="$lang_lists 
gid_Module_Langpack_Brand_$lang" || :
+            test -f gid_Module_Langpack_Resource_$lang  && lang_lists="$lang_lists 
gid_Module_Langpack_Resource_$lang" || :
+            test -f gid_Module_Langpack_Impress_$lang   && lang_lists="$lang_lists 
gid_Module_Langpack_Impress_$lang" || :
+            test -f gid_Module_Langpack_Draw_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Draw_$lang" || :
+            test -f gid_Module_Langpack_Math_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Math_$lang" || :
+            test -f gid_Module_Langpack_Calc_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Calc_$lang" || :
+            test -f gid_Module_Langpack_Base_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Base_$lang" || :
+            test -f gid_Module_Langpack_Writer_$lang    && lang_lists="$lang_lists 
gid_Module_Langpack_Writer_$lang" || :
+            test -f gid_Module_Langpack_Binfilter_$lang && lang_lists="$lang_lists 
gid_Module_Langpack_Binfilter_$lang" || :
+            # Place helps on dedicated packages.
+            test -f gid_Module_Helppack_Help_$lang      && sort -u gid_Module_Helppack_Help_$lang 
$FILELISTSDIR/help_${lang}_list.txt || :
+        else
+            test -f gid_Module_Langpack_Basis_$lang     && lang_lists="$lang_lists 
gid_Module_Langpack_Basis_$lang" || :
+            test -f gid_Module_Langpack_Brand_$lang     && lang_lists="$lang_lists 
gid_Module_Langpack_Brand_$lang" || :
+            test -f gid_Module_Langpack_Resource_$lang  && lang_lists="$lang_lists 
gid_Module_Langpack_Resource_$lang" || :
+            test -f gid_Module_Langpack_Impress_$lang   && lang_lists="$lang_lists 
gid_Module_Langpack_Impress_$lang" || :
+            test -f gid_Module_Langpack_Draw_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Draw_$lang" || :
+            test -f gid_Module_Langpack_Math_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Math_$lang" || :
+            test -f gid_Module_Langpack_Calc_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Calc_$lang" || :
+            test -f gid_Module_Langpack_Base_$lang      && lang_lists="$lang_lists 
gid_Module_Langpack_Base_$lang" || :
+            test -f gid_Module_Langpack_Writer_$lang    && lang_lists="$lang_lists 
gid_Module_Langpack_Writer_$lang" || :
+            test -f gid_Module_Langpack_Binfilter_$lang && lang_lists="$lang_lists 
gid_Module_Langpack_Binfilter_$lang" || :
+            test -f gid_Module_Helppack_Help_$lang      && lang_lists="$lang_lists 
gid_Module_Helppack_Help_$lang" || :
+        fi
+        if test -n "$lang_lists" ; then
+            # all files are installed below $INSTALLDIR/basis; we want to own also $INSTALLDIR
+            echo "%dir $INSTALLDIR" >$FILELISTSDIR/lang_${lang}_list.txt
+            cat $lang_lists | sort -u >>$FILELISTSDIR/lang_${lang}_list.txt
+        fi
+        # some help files are in _Langpack_{Writer,Impress,...}_<lang>
+        # move them from -l10n to -help
+        if test "$OOO_VENDOR" = "Mandriva" -o \( "$OOO_VENDOR" = "Novell, Inc." -a 
"$SPLIT_APP_MODULES" = "YES" \) ; then
+            for lang in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
+                test -f $FILELISTSDIR/help_${lang}_list.txt || continue;
+                mv_file_between_flists $FILELISTSDIR/help_${lang}_list.txt 
$FILELISTSDIR/lang_${lang}_list.txt $INSTALLDIR/basis$PRODUCTVERSION/help/.*
+                add_used_directories $FILELISTSDIR/help_${lang}_list.txt 
$FILELISTSDIR/lang_${lang}_list.txt
+            done
+        fi
+    done
+
+    if test -f $FILELISTSDIR/lang_en_US_list.txt -a "$OOO_VENDOR" = "Novell, Inc." -a 
"$SPLIT_APP_MODULES" != "YES" ; then
+        cat $FILELISTSDIR/lang_en_US_list.txt >>$FILELISTSDIR/common_list.txt
+        rm $FILELISTSDIR/lang_en_US_list.txt
+    fi
+
+    if test -f gid_Module_Root_SDK ; then
+        cp gid_Module_Root_SDK $FILELISTSDIR/sdk_list.txt
+    fi
+    
+    cd $FILELISTSDIR
+
+    # kde subpackage
+    test -f $DESTDIR/gid_Module_Optional_Kde && cp $DESTDIR/gid_Module_Optional_Kde kde_list.txt 
|| :
+    mv_file_between_flists kde_list.txt common_list.txt $INSTALLDIR/program/kdefilepicker
+    mv_file_between_flists kde_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/fps_kde.uno.so
+    mv_file_between_flists kde_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_kdel..so
+    mv_file_between_flists kde_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libkabdrv1.so
+    add_used_directories kde_list.txt common_list.txt
+
+    # create kde4 subpackage 
+    mv_file_between_flists kde4_list.txt kde_list.txt    
$INSTALLDIR/basis$PRODUCTVERSION/program/kde4be1.uno.so
+    mv_file_between_flists kde4_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_kde4l..so
+    mv_file_between_flists kde4_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/fps_kde4.uno.so
+    add_used_directories kde4_list.txt common_list.txt
+
+    # gnome subpackage
+    test -f $DESTDIR/gid_Module_Optional_Gnome && cp $DESTDIR/gid_Module_Optional_Gnome 
gnome_list.txt || :
+    mv_file_between_flists gnome_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libevoab2.so
+    mv_file_between_flists gnome_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/fps_gnome.uno.so
+    mv_file_between_flists gnome_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_gtk[0-9]*l..so
+    mv_file_between_flists common_list.txt gnome_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/ucpgvfs1.uno.so
+    add_used_directories gnome_list.txt common_list.txt
+
+    # mono subpackage
+    mv_file_between_flists mono_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/cli_.*.dll
+    mv_file_between_flists mono_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/cli_.*.dll.config
+    mv_file_between_flists mono_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/policy.*.cli_.*.dll
+    mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/cli_.*.dll
+    mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/cli_.*.dll.config
+    mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/policy.*.cli_.*.dll
+    mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/libcli_.*.so
+    add_used_directories mono_list.txt common_list.txt
+    # add the files from GAC if it was installed
+    test -f mono_gac && cat mono_gac >>mono_list.txt
+
+    # mailmerge
+    if test "$SPLIT_OPT_FEATURES" = "YES" ; then
+        if test "z$OOO_VENDOR" = "zMandriva" ; then
+            flist=pyuno_list.txt
+        else
+            flist=mailmerge_list.txt
+        fi
+        mv_file_between_flists $flist common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py
+        add_used_directories $flist common_list.txt
+    fi
+
+    if test "z$OOO_VENDOR" = "zNovell" ; then
+        # officebean subpackage
+        mv_file_between_flists officebean_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/classes/officebean.jar
+        mv_file_between_flists officebean_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libofficebean.so
+        add_used_directories officebean_list.txt common_list.txt
+    fi
+
+    if test -f sdk_list.txt ; then
+        # in this case we move all entries including directories
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt "%dir $DOCDIRBASE/sdk/docs.*"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/docs.*"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/examples"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/index.html"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt "%dir 
$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
+        mv_file_between_flists sdk_doc_list.txt sdk_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html"
+        add_used_directories sdk_doc_list.txt sdk_list.txt
+    fi        
+
+    if test "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" ; then
+        # move the prebuilt icons into a hacky temporary package
+        # we want to repack them into a noarch package as soon as possible
+        # without the build dependency on the huge devel package
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_classic8.zip
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_crystal.zip
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_hicontrast.zip
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_industrial.zip
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_tango.zip
+        mv_file_between_flists icon_themes_prebuilt.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images.zip
+    fi
+    
+    # Mandriva packaging
+    if test "$OOO_VENDOR" = "Mandriva"; then
+        # Not used
+        remove_file common_list.txt $INSTALLDIR/share/gallery/htmltheme.orig
+        remove_file common_list.txt $INSTALLDIR/share/dict/ooo/dictionary.lst
+
+        # And these are in -draw package
+        mv_file_between_flists draw_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_drawgraphics_filters.xcu
+        mv_file_between_flists draw_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_drawgraphics_types.xcu
+
+        # And these are in -impress package
+        mv_file_between_flists impress_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_impressgraphics_filters.xcu
+        mv_file_between_flists impress_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Types/fcfg_impressgraphics_types.xcu
+
+        # Split out the gallery
+        mv_file_between_flists gallery_list.txt common_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/share/gallery.*"
+        test -r galleries.txt && cat galleries.txt >> gallery_list.txt
+
+        # Split out dtd-officedocument1.0
+        mv_file_between_flists dtd_list.txt common_list.txt 
"$INSTALLDIR/share/dtd/officedocument.*"
+
+        # Split out java stuff
+        mv_file_between_flists java_common_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/JREProperties.class
+        mv_file_between_flists java_common_list.txt common_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/program/classes.*"
+        mv_file_between_flists java_common_list.txt common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libofficebean.so
+        mv_file_between_flists java_common_list.txt common_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/share/Scripts/java.*"
+        mv_file_between_flists java_common_list.txt filter-binfilter_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/classes/aportisdoc.jar
+        mv_file_between_flists java_common_list.txt filter-binfilter_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/classes/pocketword.jar
+        mv_file_between_flists java_common_list.txt filter-binfilter_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/classes/pexcel.jar
+        mv_file_between_flists java_common_list.txt writer_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/classes/writer2latex.jar
+
+        # Move arch-dependent/dup files from common to core
+        for f in \
+            ".*\.so" \
+            ".*\.so\..*" \
+            "program/.*\.rdb" \
+            program/configimport.bin \
+            program/javaldx \
+            program/msfontextract \
+            program/nsplugin \
+            program/oosplash.bin \
+            program/pagein \
+            program/pagein-calc \
+            program/pagein-common \
+            program/pagein-draw \
+            program/pagein-impress \
+            program/pagein-writer \
+            program/pkgchk.bin \
+            program/pluginapp.bin \
+            program/setofficelang.bin \
+            program/soffice.bin \
+            program/spadmin.bin \
+            program/uno.bin \
+            program/unopkg.bin \
+            program/uri-encode
+        do
+            mv_file_between_flists core_list.txt common_list.txt 
"$INSTALLDIR/basis$PRODUCTVERSION/$f"
+        done
+
+        # Put gtk/gnome stuff into gnome package
+        mv_file_between_flists gnome_list.txt core_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/gnome-open-url.bin
+        mv_file_between_flists gnome_list.txt core_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/fps_gnome.uno.so
+        mv_file_between_flists gnome_list.txt core_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/ucpgvfs1.uno.so
+        mv_file_between_flists gnome_list.txt core_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/program/libeggtray680li.so
+
+        # Ship ooqstart for gnome in gnome package
+        mv_file_between_flists gnome_list.txt core_list.txt 
"$INSTALLDIR/program/libqstart_gtk680.*"
+
+        # themes are included in other packages
+        # don't use remove_file as we don't want them removed from the buildroot.
+        mv_file_between_flists /dev/null common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_crystal.zip
+        mv_file_between_flists /dev/null common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_hicontrast.zip
+        mv_file_between_flists /dev/null common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_industrial.zip
+        mv_file_between_flists /dev/null common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images_tango.zip
+        mv_file_between_flists /dev/null common_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/share/config/images.zip
+    fi
+
+    # remove known duplicities to do not have files packaged in two packages
+    # the Bulgarian fixes can be removed after the issue #54110 is fixed
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/arrowhd.soe
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/classic.sog
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/hatching.soh
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/modern.sog
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/palette.soc
+    remove_duplicity_from_flists common_list.txt lang_bg_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/styles.sod
+    # the British fixes can be removed after the issue #54113 is fixed
+    remove_duplicity_from_flists common_list.txt lang_en-GB_list.txt 
$INSTALLDIR/basis$PRODUCTVERSION/presets/config/standard.sog
+
+else
+
+    echo "Creating package directories..."
+
+    test -d pkg && rm -r pkg || :
+
+    # Create package tree (needed by Debian's dpkg)
+    # create_package_directory <list_file> <directory_name>
+    create_package_directory()
+    {
+        listfile=$1
+        directory="$2"
+        perl -nl \
+            -e " if(/^%dir (.*)/)
+                    {system('mkdir', '-p', '-m', '755', \"$directory\".\$1);}
+                else
+                    {rename('./'.\$_, \"$directory\".\$_);}
+                " \
+            $listfile
+    }
+
+    create_package_directory gid_Module_Root_Ure_Hidden        pkg/ure
+
+    create_package_directory gid_Module_Root                        pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Brand                  pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_Images           pkg/libreoffice-common
+    create_package_directory gid_Module_Oo_Linguistic               pkg/libreoffice-common
+    create_package_directory gid_Module_Optional_Xsltfiltersamples  pkg/libreoffice-common
+    create_package_directory gid_Module_Optional_Javafilter         pkg/libreoffice-common
+    if [ -f gid_Module_Optional_Binfilter ]; then 
+        create_package_directory gid_Module_Optional_Binfilter      
pkg/libreoffice-filter-binfilter
+    fi
+    create_package_directory gid_Module_Optional_Grfflt             pkg/libreoffice-draw
+    create_package_directory gid_Module_Prg_Calc_Bin                pkg/libreoffice-calc
+    create_package_directory gid_Module_Prg_Math_Bin                pkg/libreoffice-math
+    create_package_directory gid_Module_Prg_Draw_Bin                pkg/libreoffice-draw
+    create_package_directory gid_Module_Prg_Wrt_Bin                 pkg/libreoffice-writer
+    create_package_directory gid_Module_Prg_Impress_Bin             pkg/libreoffice-impress
+    create_package_directory gid_Module_Prg_Base_Bin                pkg/libreoffice-base
+    create_package_directory gid_Module_Brand_Prg_Calc              pkg/libreoffice-calc
+    create_package_directory gid_Module_Brand_Prg_Math              pkg/libreoffice-math
+    create_package_directory gid_Module_Brand_Prg_Draw              pkg/libreoffice-draw
+    create_package_directory gid_Module_Brand_Prg_Wrt               pkg/libreoffice-writer
+    create_package_directory gid_Module_Brand_Prg_Impress           pkg/libreoffice-impress
+    create_package_directory gid_Module_Brand_Prg_Base              pkg/libreoffice-base
+    create_package_directory gid_Module_Optional_Pyuno              pkg/python-uno
+    create_package_directory gid_Module_Optional_Gnome              pkg/libreoffice-gnome
+    create_package_directory gid_Module_Optional_Kde                pkg/libreoffice-kde
+
+    create_package_directory gid_Module_Root_Files_2                pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_3                pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_4                pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_5                pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_6                pkg/libreoffice-common
+    create_package_directory gid_Module_Root_Files_7                pkg/libreoffice-common
+    create_package_directory gid_Module_Optional_Testtool           pkg/libreoffice-qa-tools
+    if [ -e gid_Module_Optional_Pymailmerge ]; then
+        create_package_directory gid_Module_Optional_Pymailmerge    pkg/libreoffice-emailmerge
+    else # post m26
+        mkdir -p pkg/libreoffice-emailmerge/$INSTALLDIR/basis$PRODUCTVERSION/program
+        mv pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py \
+            pkg/libreoffice-emailmerge/$INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py
+    fi
+    create_package_directory gid_Module_Optional_OGLTrans           pkg/libreoffice-ogltrans
+
+    create_package_directory gid_Module_Root_SDK                    pkg/libreoffice-dev
+
+    for l in `echo $WITH_LANG_LIST`; do
+        for p in Impress Draw Math Calc Base Writer; do
+            create_package_directory  gid_Module_Langpack_${p}_`echo $l | sed -e s/-/_/g` 
pkg/libreoffice-l10n-$l
+        done
+        create_package_directory gid_Module_Langpack_Basis_`echo $l | sed -e s/-/_/g`     
pkg/libreoffice-l10n-$l
+        create_package_directory gid_Module_Langpack_Brand_`echo $l | sed -e s/-/_/g`     
pkg/libreoffice-l10n-$l
+        create_package_directory gid_Module_Langpack_Resource_`echo $l | sed -e s/-/_/g`  
pkg/libreoffice-l10n-$l
+        create_package_directory gid_Module_Helppack_Help_`echo $l | sed -e s/-/_/g`      
pkg/libreoffice-help-$l
+        if [ -f gid_Module_Optional_Binfilter ]; then
+            if [ "$l" = "en-US" ]; then
+                create_package_directory gid_Module_Langpack_Binfilter_en_US    
pkg/libreoffice-filter-binfilter
+            else
+                create_package_directory gid_Module_Langpack_Binfilter_`echo $l | sed -e s/-/_/g`  
  pkg/libreoffice-l10n-$l
+            fi
+        fi
+        # some help files are in _Langpack_{Writer,Impress,...}_<lang>
+        # move them from -l10n to -help
+        if [ "$l" = "en-US" ]; then d=en; else d=$l; fi
+        mv pkg/libreoffice-l10n-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d/* \
+            pkg/libreoffice-help-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d && \
+        rmdir pkg/libreoffice-l10n-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d
+    done
+
+    # move_wrappers <directory_name> <name> [...]
+    move_wrappers()
+    {
+        directory=$1
+        shift
+        mkdir -m755 -p "$directory"/usr/bin
+        while test -n "$1"; do
+            mv usr/*bin/"$1$BINSUFFIX" "$directory"/usr/bin
+            shift
+        done
+    }
+    move_wrappers pkg/libreoffice-common soffice unopkg
+    if test "$COMPAT_OOWRAPPERS" = "YES" ; then
+        move_wrappers pkg/libreoffice-common ooffice oofromtemplate
+        move_wrappers pkg/libreoffice-base oobase
+        move_wrappers pkg/libreoffice-writer oowriter ooweb
+        move_wrappers pkg/libreoffice-calc oocalc
+        move_wrappers pkg/libreoffice-impress ooimpress
+        move_wrappers pkg/libreoffice-math oomath
+        move_wrappers pkg/libreoffice-draw oodraw
+    fi
+    move_wrappers pkg/libreoffice-common libreoffice lofromtemplate
+    move_wrappers pkg/libreoffice-base lobase
+    move_wrappers pkg/libreoffice-writer lowriter loweb
+    move_wrappers pkg/libreoffice-calc localc
+    move_wrappers pkg/libreoffice-impress loimpress
+    move_wrappers pkg/libreoffice-math lomath
+    move_wrappers pkg/libreoffice-draw lodraw
+    
+    # Move all libraries, binaries, *.rdb from -common to -core
+    for d in $INSTALLDIR/basis$PRODUCTVERSION/program $INSTALLDIR/program; do \
+      if [ ! -d $DESTDIR/pkg/libreoffice-core/$d ]; then \
+      mkdir -p $DESTDIR/pkg/libreoffice-core/$d; \
+      fi &&
+      ( cd pkg/libreoffice-common/$d
+        find -maxdepth 1 \
+           -regex 
'\./\(.*\.so.*\|.*\.bin\|pagein\|nsplugin\|kdefilepicker\|msfontextract\|.*\.rdb\|javaldx\|uri-encode\)'
 \
+           -exec mv {} $DESTDIR/pkg/libreoffice-core/$d \;
+      ); \
+    done
+
+    # install additional ooo-build scripts & misc stuff
+    mkdir -p pkg/libreoffice-common/usr/share/man/man1
+    if test "$COMPAT_OOWRAPPERS" = "YES" ; then
+        mv usr/share/man/man1/openoffice$BINSUFFIX.1 \
+            pkg/libreoffice-common/usr/share/man/man1
+    fi
+    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 .$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath \
+        pkg/libreoffice-common/$INSTALLDIR/program
+    if echo $WITH_LANG_LIST | grep -q en-US; then
+        for i in forms/resume.ott officorr/project-proposal.ott; do \
+            mkdir -p 
pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/`dirname $i`; \
+            mv .$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/$i \
+                pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/$i; \
+        done; \
+    fi
+    # Warn for any remaining files
+    find . -path './pkg' -prune -o -not -name 'gid_Module_*' -not -type d -exec echo "File not 
packaged: {}" \;
+fi
+
+# mark the config files
+RPM_CONFIG_FILE_TAGS=
+if test "$OOO_VENDOR" = "Novell, Inc." -o "$OOO_VENDOR" = "RedHat"; then
+    RPM_CONFIG_FILE_TAGS="%config"
+elif test "$OOO_VENDOR" = "PLD" ; then
+    RPM_CONFIG_FILE_TAGS="%config(noreplace) %verify(not md5 size mtime)"
+fi
+
+if test "z$RPM_CONFIG_FILE_TAGS" != "z" ; then
+    cd $FILELISTSDIR
+    perl -pi -e "s|^($INSTALLDIR/help/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/help/.*\.css)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/program/[a-zA-Z0-9_\.]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/program/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/config/[a-zA-Z0-9]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/dict/ooo/.*\.lst)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/psprint/.*\.conf)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/registry/.*\.xcu)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/registry/.*\.properties)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/share/registry/.*\.xcs)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+           -e "s|^($INSTALLDIR/user/config/.*\.so.)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+       *_list.txt
+fi
+
+mkdir -p $FILELISTSDIR/orig
+mv -f $DESTDIR/gid_Module_* $FILELISTSDIR/orig
diff --git a/bin/distro-install-sdk b/bin/distro-install-sdk
new file mode 100755
index 0000000..b147b45
--- /dev/null
+++ b/bin/distro-install-sdk
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+if test -d $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk ; then
+
+    echo "SDK installation clean up"
+
+    # bin potential .orig files
+    find $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk -name "*.orig" -exec rm -f {} \;
+
+    # move some SDK directories to the right place according to FHS
+    # note that examples must stay in $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk because there 
are used
+    # relative paths to $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/setting and it does not work 
via
+    # a symlink
+    mkdir -p $DESTDIR$PREFIXDIR/include
+    mkdir -p $DESTDIR$DATADIR/idl
+    mkdir -p $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk
+    mkdir -p $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/include      
$DESTDIR$PREFIXDIR/include/$INSTALLDIRNAME
+    if [ -d $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes ]; then
+        mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes      
$DESTDIR$DATADIR/$INSTALLDIRNAME/sdk/classes
+    fi
+    mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl          
$DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+    mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs         $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/share/readme $DESTDIR$DOCDIR/sdk/readme
+    mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html   $DESTDIR$DOCDIR/sdk
+
+    # compat symlinks
+    ln -sf $PREFIXDIR/include/$INSTALLDIRNAME                        
$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/include
+    ln -sf $DATADIR/$INSTALLDIRNAME/sdk/classes                      
$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes
+    ln -sf $DATADIR/idl/$INSTALLDIRNAME                              
$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl
+    ln -sf $DOCDIR/sdk/docs                                          
$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/
+    ln -sf $DOCDIR/sdk/index.html                                    
$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html
+    ln -sf $INSTALLDIR/basis$PRODUCTVERSION/sdk/examples         $DESTDIR$DOCDIR/sdk/examples
+
+    # fix file list
+    sed -e "s|^\(%dir 
\)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/include|\1$PREFIXDIR/include/$INSTALLDIRNAME|" \
+       -e "s|^\(%dir 
\)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes|\1$DATADIR/$INSTALLDIRNAME/sdk/classes|" \
+       -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl|\1$DATADIR/idl/$INSTALLDIRNAME|" 
\
+       -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs|\1$DOCDIR/sdk/docs|" \
+       -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/share/readme|\1$DOCDIR/sdk/readme|" \
+       -e "s|^$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html$|$DOCDIR/sdk/index.html|" \
+       -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/share.*$||" \
+       -e "/\.orig$/D" \
+       -e "/^$/D" \
+       $DESTDIR/gid_Module_Root_SDK | sort -u \
+       >$DESTDIR/gid_Module_Root_SDK.new
+    mv $DESTDIR/gid_Module_Root_SDK.new $DESTDIR/gid_Module_Root_SDK
+    #
+    echo "%dir $DATADIR/$INSTALLDIRNAME/sdk"                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/$INSTALLDIRNAME"                        >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/idl"                                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk/docs"                                >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk"                                     >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR"                                         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/include"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl"         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs"        >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html"  >>$DESTDIR/gid_Module_Root_SDK
+    echo "$DOCDIR/sdk/examples"                                 >>$DESTDIR/gid_Module_Root_SDK
+
+    # generate default profiles
+    for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do
+        sed -e "s,@OO_SDK_NAME@,openoffice.org${PRODUCTVERSION}_sdk," \
+           -e "s,@OO_SDK_HOME@,$INSTALLDIR/basis$PRODUCTVERSION/sdk," \
+           -e "s,@OFFICE_HOME@,$INSTALLDIR," \
+           -e "s,@OFFICE_BASE_HOME@,$INSTALLDIR/basis$PRODUCTVERSION," \
+           -e "s,@OO_SDK_URE_HOME@,$INSTALLDIR/basis$PRODUCTVERSION/ure-link," \
+           -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \
+           -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \
+           -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \
+           -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \
+           -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
+           -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
+           -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
+            $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file.in \
+           > $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file
+       chmod 755 $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file
+       echo $INSTALLDIR/basis$PRODUCTVERSION/sdk/$file >>$DESTDIR/gid_Module_Root_SDK
+    done
+    
+    # FIXME: I rather set this file to be non-world-writttable for now, i#64812
+    chmod go-w $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/settings/component.uno.map
+fi
diff --git a/bin/generate-bash-completion b/bin/generate-bash-completion
new file mode 100755
index 0000000..dafe413
--- /dev/null
+++ b/bin/generate-bash-completion
@@ -0,0 +1,234 @@
+#!/usr/bin/env perl
+# script to generate LibreOffice bash_completion file for the main applications
+# written by Rene Engelhard <rene@debian.org>, Public Domain
+# updated for libreoffice-build by Petr Mladek <pmladek@suse.cz>, Public Domain
+# yes, this script probably is not real good code :) but still easier
+# to maintain than adding those entries statically many times in
+# a file...
+
+use strict;
+
+my @DRAWDOCS=("sxd", "std", "dxf", "emf", "eps", "met", "pct", "sgf", "sgv", "sda",
+          "sdd", "vor", "svm", "wmf", "bmp", "gif", "jpg", "jpeg", "jfif", "fif",
+          "jpe", "pcd", "pcx", "pgm", "png", "ppm", "psd", "ras", "tga", "tif",
+          "tiff", "xbm", "xpm", "odg", "otg", "fodg", "odc", "odi", "sds", 
+          "wpg", "svg");
+
+my @IMPRESSDOCS=("sxi", "sti", "ppt", "pps", "pot", "sxd", "sda", "sdd", "sdp",
+             "vor", "cgm", "odp", "otp", "fodp", "ppsm", "ppsx", "pptm", "pptx",
+             "potm", "potx");
+
+my @TEMPLATES=("stw", "dot", "vor", "stc", "xlt", "sti", "pot", "std", "stw",
+             "dotm", "dotx", "potm", "potx", "xltm", "xltx");
+
+my @MATHDOCS=("sxm", "smf", "mml", "odf");
+
+my @MASTERDOCS=("sxg", "odm", "sgl");
+
+my @WRITERDOCS=("doc", "dot", "rtf", "sxw", "stw", "sdw", "vor", "txt", "htm?",
+            "xml", "wp", "wpd", "wps", "odt", "ott", "fodt", "docm", "docx",
+            "dotm", "dotx");
+
+my @WEBDOCS=("htm", "html", "stw", "txt", "vor", "oth");
+
+my @BASEDOCS=("odb");
+
+my @CALCDOCS=("sxc", "stc", "dif", "dbf", "xls", "xlw", "xlt", "rtf", "sdc", "vor",
+          "slk", "txt", "htm", "html", "wk1", "wks", "123", "xml", "ods", "ots",
+          "fods", "csv", "xlsb", "xlsm", "xlsx", "xltm", "xltx");
+
+my @EXTENSIONS=("oxt");
+
+# default names of lowrappers
+# use "" if you want to disable any wrapper
+my %APPS = (
+       office          => "libreoffice",
+       master          => "",
+       base            => "lobase",
+       calc            => "localc",
+       draw            => "lodraw",
+       impress         => "loimpress",
+       math            => "lomath",
+       template        => "lofromtemplate",
+       unopkg          => "unopkg",
+       web             => "loweb",
+       writer          => "lowriter",
+);
+
+my $office_shell_function = "_loexp_";
+
+sub usage()
+{
+    print "Script to Generate bash completion for LO wrappers\n\n";
+
+    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";
+    print "\t\t[--calc=wrapper_name]\n";
+    print "\t\t[--draw=wrapper_name]\n";
+    print "\t\t[--impress=wrapper_name]\n";
+    print "\t\t[--math=wrapper_name]\n";
+    print "\t\t[--template=wrapper_name]\n";
+    print "\t\t[--unopkg=wrapper_name]\n";
+    print "\t\t[--web=wrapper_name]\n";
+    print "\t\t[--writer=wrapper_name]\n";
+    print "\t\tinput_file\n";
+    print "\t\toutput_file\n\n";
+
+    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";
+}
+
+my $infilename;
+my $outfilename;
+my $binsuffix = '';
+
+my $opt;
+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";
+                $office_shell_function = "_ooexp_";
+       } elsif ( $arg =~ /--binsuffix=(.*)/ ) {
+               $binsuffix = "$1";
+       } elsif ( $arg =~ /--office=(.*)/ ) {
+               $APPS{'office'} = "$1";
+       } elsif ( $arg =~ /--master=(.*)/ ) {
+               $APPS{'master'} = "$1";
+       } elsif ( $arg =~ /--base=(.*)/ ) {
+               $APPS{'base'} = "$1";
+       } elsif ( $arg =~ /--calc=(.*)/ ) {
+               $APPS{'calc'} = "$1";
+       } elsif ( $arg =~ /--draw=(.*)/ ) {
+               $APPS{'draw'} = "$1";
+       } elsif ( $arg =~ /--impress=(.*)/ ) {
+               $APPS{'impress'} = "$1"
+       } elsif ( $arg =~ /--math=(.*)/ ) {
+               $APPS{'math'} = "$1";
+       } elsif ( $arg =~ /--template=(.*)/ ) {
+               $APPS{'template'} = "$1";
+       } elsif ( $arg =~ /--unopkg=(.*)/ ) {
+               $APPS{'unopkg'} = "$1";
+       } elsif ( $arg =~ /--web=(.*)/ ) {
+               $APPS{'web'} = "$1";
+       } elsif ( $arg =~ /--writer=(.*)/ ) {
+               $APPS{'writer'} = "$1"
+       } elsif ( $arg =~ /^-.*/ ) {
+               printf STDERR "Error: invalid option \"$arg\", try --help\n";
+               exit 1;
+       } elsif ( $outfilename ) {
+               printf STDERR "Error: too much arguments, try --help\n";
+               exit 1;
+       } else {
+               if ($infilename) {
+                   $outfilename = "$arg";
+               } else {
+                   $infilename = "$arg";
+               }
+       }
+}
+
+unless ( $infilename ) {
+       printf STDERR "Error: undefined input file, try --help\n";
+       exit 1;
+}
+       
+unless ( $outfilename ) {
+       printf STDERR "Error: undefined output file, try --help\n";
+       exit 1;
+}
+    
+#add binsuffix
+foreach my $app (keys %APPS) {
+    $APPS{$app} .= "$binsuffix" unless ( "$APPS{$app}" eq "" );
+}
+
+sub print_suffixes_check {
+    my $app = shift(@_);
+    my $first_suffix = shift(@_);
+    
+    ($first_suffix) || die "Error: No suffix defined for $app\n";
+    
+    print BCOUTFILE "    $app)\t\te=\'!*.+(" . $first_suffix . "|" . uc($first_suffix);
+    foreach my $suffix (@_) {
+       print BCOUTFILE "|" . $suffix;
+       print BCOUTFILE "|" . uc($suffix);
+    }
+    print BCOUTFILE ")\' ;;\n";
+}
+
+sub print_suffixes_checks {
+    foreach my $app (keys %APPS) {
+       # skip the disabled wrapper
+       next if ( $APPS{$app} eq "" );
+
+       if ($app eq "draw" ) { print_suffixes_check ($APPS{$app}, @DRAWDOCS); }
+       if ($app eq "writer") { print_suffixes_check ($APPS{$app}, @WRITERDOCS, @MASTERDOCS); }
+       if ($app eq "web") { print_suffixes_check ($APPS{$app}, @WEBDOCS); }
+       if ($app eq "math") { print_suffixes_check ($APPS{$app}, @MATHDOCS); }
+       if ($app eq "impress") { print_suffixes_check ($APPS{$app}, @IMPRESSDOCS); }
+       if ($app eq "base") { print_suffixes_check ($APPS{$app}, @BASEDOCS); }
+       if ($app eq "calc") { print_suffixes_check ($APPS{$app}, @CALCDOCS); }
+       if ($app eq "master") { print_suffixes_check ($APPS{$app}, @MASTERDOCS); }
+       if ($app eq "template") { print_suffixes_check ($APPS{$app}, @TEMPLATES); }
+       # libreoffice should contain all...
+       if ($app eq "office") { print_suffixes_check ($APPS{$app}, @DRAWDOCS, @WRITERDOCS, 
@MATHDOCS, @IMPRESSDOCS, @BASEDOCS, @CALCDOCS, @MASTERDOCS, @TEMPLATES, @WEBDOCS); }
+       # unopkg is a standalone tool
+       if ($app eq "unopkg") { print_suffixes_check ($APPS{$app}, @EXTENSIONS); }
+    }
+}    
+
+sub print_apps {
+    my $app_to_print;
+    foreach my $app (keys %APPS) {
+       # skip the disabled wrapper
+       next if ( $APPS{$app} eq "" );
+       
+       print BCOUTFILE "\t\t\t\t\t$app_to_print \\\n" if ($app_to_print);
+       $app_to_print = $APPS{$app};
+    }
+    # the last app will be printed without the final backslash
+    ($app_to_print) || die "Error: No LO wrapper was selected\n";
+    print BCOUTFILE "\t\t\t\t\t$app_to_print\n";
+}
+
+
+open (BCINFILE, "$infilename") || die "Error: can't open $infilename for reading: $!\n";
+open (BCOUTFILE, "> $outfilename") || die "Error: can't open $outfilename for writing: $!\n";
+
+while (my $line = <BCINFILE>) {
+    chomp $line;
+
+    $line =~ s/\@OFFICE_SHELL_FUNCTION\@/$office_shell_function/;
+
+    if ($line =~ m/\@BASH_COMPLETION_SUFFIXES_CHECKS\@/) {
+       print_suffixes_checks();
+    } elsif ($line =~ m/\@BASH_COMPLETION_OOO_APPS\@/) {
+       print_apps();
+    } else {
+       print BCOUTFILE "$line\n";
+    }
+}
+
+close (BCINFILE);
+close (BCOUTFILE);
diff --git a/bin/java-set-classpath.in b/bin/java-set-classpath.in
new file mode 100644
index 0000000..539e859
--- /dev/null
+++ b/bin/java-set-classpath.in
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+#*****************************************************************************
+# 
+#  java-set-classpath - Utility to update the default CLASSPATH for OpenOffice.org
+# 
+#  Initial version by: Petr Mladek <pmladek@suse.cz>
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License version 2, as
+#  published by the Free Software Foundation.
+# 
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+# 
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 
+#*****************************************************************************
+
+if test "z$1" = "z" ; then
+    echo "Update the default CLASSPATH for OpenOffice.org"
+    echo ""
+    echo "Usage: $0 [dir|jar]..."
+    echo ""
+    echo "The utility updates the OpenOffice.org system setting. It adds or removes"
+    echo "the given directories and jar-files to or from the default CLASSPATH"
+    echo "depending on if they are available on the system or not."
+    echo ""
+    echo "Parameters:"
+    echo "        dir - absolute path to a directory"
+    echo "        jar - absolute path to a jar-file"
+    exit 0;
+fi
+
+JVM_CONFIG_FILE=@OOINSTBASE@/basis-link/program/fundamentalbasisrc
+
+for path in $@ ; do
+    if test "z${path%%/*}" != "z" ; then
+       echo "Warning: the path "$path" is not absolute and will be ignored"
+       continue
+    fi
+    if test -e $path ; then
+       # the file exist
+       grep "URE_MORE_JAVA_CLASSPATH_URLS.*file:/*$path\([[:space:]].*\)\?$" $JVM_CONFIG_FILE 
/dev/null && continue
+       # it is not registered
+       TMP_FILE=`mktemp /tmp/ooset-java-class.XXXXXXXXXX` || exit 1
+       sed -e "s|^\(.*URE_MORE_JAVA_CLASSPATH_URLS.*\)$|\1 file://$path|" $JVM_CONFIG_FILE 
$TMP_FILE
+       mv -f $TMP_FILE $JVM_CONFIG_FILE
+       chmod 644 $JVM_CONFIG_FILE
+    else
+       # the file does not exist, remove it from the configuration
+       TMP_FILE=`mktemp /tmp/ooset-java-class.XXXXXXXXXX` || exit 1;
+       sed -e "s|^\(.*URE_MORE_JAVA_CLASSPATH_URLS.*\)file:/*$path\([[:space:]].*\)\?$|\1\2|" \
+           -e "s/\(URE_MORE_JAVA_CLASSPATH_URLS=\)[[:space:]]\+/\1/" \
+           -e "/^.*URE_MORE_JAVA_CLASSPATH_URLS/s/[[:space:]]\+/ /g" \
+           -e "/^.*URE_MORE_JAVA_CLASSPATH_URLS/s/[[:space:]]*$//" $JVM_CONFIG_FILE >$TMP_FILE
+       mv -f $TMP_FILE $JVM_CONFIG_FILE
+       chmod 644 $JVM_CONFIG_FILE
+    fi
+done
diff --git a/configure.in b/configure.in
index f12dcdf..6969bec 100755
--- a/configure.in
+++ b/configure.in
@@ -276,6 +276,18 @@ AC_ARG_ENABLE(broffice,
         locale is removed, giving uniform branding.]),
 ,enable_broffice=no)
 
+AC_ARG_ENABLE(split-app-modules,
+    AS_HELP_STRING([--enable-split-app-modules],
+        [Split file lists for app modules, e.g. base, calc.
+         Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_ENABLE(split-opt-features,
+    AS_HELP_STRING([--enable-split-opt-features],
+        [Split file lists for some optional features, .e.g. pyuno, testtool.
+         Has effect only with make distro-pack-install]),
+,)
+
 AC_ARG_ENABLE(cairo,
     AS_HELP_STRING([--disable-cairo],
         [Determines whether to use Cairo library on platforms where Cairo is
@@ -1230,6 +1242,13 @@ AC_ARG_WITH(unix-wrapper,
     ],
 ,)
 
+AC_ARG_WITH(compat-oowrappers,
+    AS_HELP_STRING([--with-compat-oowrappers],
+        [Install oo* wrappers in parallel with
+         lo* ones to keep backward compatibility.
+         Has effect only with make distro-pack-install]),
+,)
+
 AC_ARG_WITH(asm-home,
     AS_HELP_STRING([--with-asm-home],
         [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
@@ -6172,6 +6191,18 @@ else
 fi
 AC_SUBST(ENABLE_BROFFICE)
 
+SPLIT_APP_MODULES=""
+if test "$enable_split_app_modules" = "yes"; then
+    SPLIT_APP_MODULES="YES"
+fi
+AC_SUBST(SPLIT_APP_MODULES)
+    
+SPLIT_OPT_FEATURES=""
+if test "$enable_split_opt_features" = "yes"; then
+    SPLIT_OPT_FEATURES="YES"
+fi
+AC_SUBST(SPLIT_OPT_FEATURES)
+
 dnl ===================================================================
 dnl Check whether the Cairo libraries are available.
 dnl ===================================================================
@@ -7834,6 +7865,14 @@ fi
 AC_SUBST(OOO_JUNIT_JAR)
 
 dnl ===================================================================
+dnl Product version
+dnl ===================================================================
+AC_MSG_CHECKING([for product version])
+[eval $(sed -n -e 's/ //g' -e '/PRODUCTVERSION=/p' solenv/inc/productversion.mk)]
+AC_MSG_RESULT([$PRODUCTVERSION])
+AC_SUBST(PRODUCTVERSION)
+
+dnl ===================================================================
 dnl Dealing with l10n options
 dnl ===================================================================
 GIT_REPO_NAMES="artwork base calc components extensions extras filters help impress libs-core 
libs-extern libs-extern-sys libs-gui postprocess sdk testing ure writer"
@@ -7865,8 +7904,11 @@ for lang in $WITH_LANG ; do
    test `echo "$all_langs" | sed "s|.* $lang .*|found|"` = "found" && continue;
    AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
 done
+# list with substituted ALL
+WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
 AC_SUBST(ALL_LANGS)
 AC_SUBST(WITH_LANG)
+AC_SUBST(WITH_LANG_LIST)
 AC_SUBST(GIT_REPO_NAMES)
 
 AC_MSG_CHECKING([for another 'intro' bitmap])
@@ -7917,13 +7959,58 @@ else
 fi
 AC_SUBST(UNIXWRAPPERNAME)
 
-INSTALL_DIRNAME=`echo AC_PACKAGE_NAME | tr [[:upper:]] [[:lower:]]`
+AC_MSG_CHECKING([whether to install the compat oo* wrappers]) 
+if test "$with_compat_oowrappers" = "yes" ; then 
+    WITH_COMPAT_OOWRAPPERS=YES 
+    AC_MSG_RESULT(yes) 
+else 
+    WITH_COMPAT_OOWRAPPERS=
+    AC_MSG_RESULT(no) 
+fi 
+AC_SUBST(WITH_COMPAT_OOWRAPPERS) 
+
+AC_MSG_CHECKING([for product name])
+PRODUCTNAME=AC_PACKAGE_NAME
+AC_MSG_RESULT([$PRODUCTNAME])
+AC_SUBST(PRODUCTNAME)
+
+INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr [[:upper:]] [[:lower:]]`
 AC_MSG_CHECKING([for install dirname])
 if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" 
!= "yes" ; then
-   INSTALL_DIRNAME="$with_install_dirname"
-fi
-AC_MSG_RESULT([$INSTALL_DIRNAME])
-AC_SUBST(INSTALL_DIRNAME)
+   INSTALLDIRNAME="$with_install_dirname"
+fi
+AC_MSG_RESULT([$INSTALLDIRNAME])
+AC_SUBST(INSTALLDIRNAME)
+
+AC_MSG_CHECKING([for prefix])
+PREFIXDIR="$prefix"
+AC_MSG_RESULT([$PREFIXDIR])
+AC_SUBST(PREFIXDIR)
+
+AC_MSG_CHECKING([for install dir])
+INSTALLDIR="$libdir/$INSTALLDIRNAME"
+AC_MSG_RESULT([$INSTALLDIR])
+AC_SUBST(INSTALLDIR)
+
+AC_MSG_CHECKING([for libdir])
+LIBDIR=[$(eval echo $(eval echo $libdir))]
+AC_MSG_RESULT([$LIBDIR])
+AC_SUBST(LIBDIR)
+
+AC_MSG_CHECKING([for data dir])
+DATADIR=[$(eval echo $(eval echo $datadir))]
+AC_MSG_RESULT([$DATADIR])
+AC_SUBST(DATADIR)
+
+AC_MSG_CHECKING([for man dir])
+MANDIR=[$(eval echo $(eval echo $mandir))]
+AC_MSG_RESULT([$MANDIR])
+AC_SUBST(MANDIR)
+
+AC_MSG_CHECKING([for doc dir])
+DOCDIR=[$(eval echo $(eval echo $docdir))]
+AC_MSG_RESULT([$DOCDIR])
+AC_SUBST(DOCDIR)
 
 AC_MSG_CHECKING([whether to statically link to Gtk])
 if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
diff --git a/set_soenv.in b/set_soenv.in
index 8e39314..4c047b6 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1592,10 +1592,12 @@ ToFile( "Empty",             $empty,             "n" );
 ToFile( "Platform independent constant values.", $empty, "c" );
 # Languages
 ToFile( "WITH_LANG",         "@WITH_LANG@",      "e" );
+ToFile( "WITH_LANG_LIST",    "@WITH_LANG_LIST@", "e" );
 ToFile( "INTRO_BITMAP",      "@INTRO_BITMAP@",   "e" );
 ToFile( "ABOUT_BITMAP",      "@ABOUT_BITMAP@",   "e" );
 ToFile( "OOO_VENDOR",        "@OOO_VENDOR@",     "e" );
 ToFile( "OOODMAKEMODE",      "YES",              "e" );
+ToFile( "PRODUCTVERSION",    "@PRODUCTVERSION@", "e" );
 ToFile( "WITH_POOR_HELP_LOCALIZATIONS", $WITH_POOR_HELP_LOCALIZATIONS, "e" );
 
 ToFile( "CALL_CDECL",        $CALL_CDECL,        "e" );
@@ -1622,8 +1624,17 @@ ToFile( "EXTERNAL_WARNINGS_NOT_ERRORS", "TRUE",  "e" );
 ToFile( "PRODUCT",           "@PRODUCT@",        "e" );
 ToFile( "PROFULLSWITCH",     "@PROFULLSWITCH@",  "e" );
 ToFile( "PROEXT",            $PROEXT,            "e" );
-ToFile( "VALGRIND_CFLAGS",   "@VALGRIND_CFLAGS@",  "e" );
+ToFile( "VALGRIND_CFLAGS",   "@VALGRIND_CFLAGS@","e" );
+ToFile( "WITH_COMPAT_OOWRAPPERS", "@WITH_COMPAT_OOWRAPPERS@", "e" );
 ToFile( "UNIXWRAPPERNAME",   "@UNIXWRAPPERNAME@","e" );
+ToFile( "PRODUCTNAME",       "@PRODUCTNAME@",    "e" );
+ToFile( "INSTALLDIRNAME",    "@INSTALLDIRNAME@", "e" );
+ToFile( "PREFIXDIR",         "@PREFIXDIR@",      "e" );
+ToFile( "INSTALLDIR",        "@INSTALLDIR@",     "e" );
+ToFile( "LIBDIR",            "@LIBDIR@",         "e" );
+ToFile( "DATADIR",           "@DATADIR@",        "e" );
+ToFile( "MANDIR",            "@MANDIR@",         "e" );
+ToFile( "DOCDIR",            "@DOCDIR@",          "e" );
 ToFile( "BUILD_MOZAB",       "@BUILD_MOZAB@",    "e" );
 ToFile( "PREBUILD_MOZAB",    $PREBUILD_MOZAB,    "e" );
 ToFile( "MOZILLA_VERSION",   $MOZILLA_VERSION,   "e" );
@@ -1642,6 +1653,8 @@ ToFile( "ENABLE_SYSTRAY_GTK", "@ENABLE_SYSTRAY_GTK@", "e" );
 ToFile( "ENABLE_STATIC_GTK", "@ENABLE_STATIC_GTK@", "e" );
 ToFile( "ENABLE_CAIRO",      "@ENABLE_CAIRO@",     "e" );
 ToFile( "ENABLE_BROFFICE",   "@ENABLE_BROFFICE@",  "e" );
+ToFile( "SPLIT_APP_MODULES", "@SPLIT_APP_MODULES@","e" );
+ToFile( "SPLIT_OPT_FEATURES","@SPLIT_OPT_FEATURES@","e" );
 ToFile( "ENABLE_OPENGL",     "@ENABLE_OPENGL@",    "e" );
 ToFile( "ENABLE_PDFIMPORT",  "@ENABLE_PDFIMPORT@", "e" );
 ToFile( "ENABLE_MINIMIZER",   "@ENABLE_MINIMIZER@","e" );
-- 
1.7.3.4

From aa05e454eefdab0d02e97ef672e6476b8941bd31 Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.cz>
Date: Fri, 8 Jul 2011 12:30:30 +0200
Subject: [PATCH] Support distro packaging

allow to redefine prefix via OFFICE_PREFIX variable in create_tree.sh

add libreoffice and unopg man pages
---
 sysui/desktop/man/README           |    1 +
 sysui/desktop/man/libreoffice.1    |  246 ++++++++++++++++++++++++++++++++++++
 sysui/desktop/man/unopkg.1         |   80 ++++++++++++
 sysui/desktop/share/create_tree.sh |    2 +-
 4 files changed, 328 insertions(+), 1 deletions(-)
 create mode 100644 sysui/desktop/man/README
 create mode 100644 sysui/desktop/man/libreoffice.1
 create mode 100644 sysui/desktop/man/unopkg.1

diff --git a/sysui/desktop/man/README b/sysui/desktop/man/README
new file mode 100644
index 0000000..1536ae5
--- /dev/null
+++ b/sysui/desktop/man/README
@@ -0,0 +1 @@
+FIXME: These man pages are used for distro packaging using "make distro-pack-install"
diff --git a/sysui/desktop/man/libreoffice.1 b/sysui/desktop/man/libreoffice.1
new file mode 100644
index 0000000..ee814cf
--- /dev/null
+++ b/sysui/desktop/man/libreoffice.1
@@ -0,0 +1,246 @@
+.TH libreoffice "1" "2010-12-18" "LibreOffice" "User Commands"
+.SH Name
+libreoffice \- LibreOffice office suite
+
+.SH SYNOPSIS
+.B libreoffice
+[\fB\-accept\=\fIaccept\-string\fR] [\fB\-base\fR] [\fB\-calc\fR]
+[\fB\-convert\-to\fR output_file_extension[:output_filter_name] [\-outdir output_dir] 
\fIfile\fR]...
+[\fB\-display \fIdisplay\fR] [\fB\-draw\fR] [\fB\-global\fR] [\fB\-headless\fR]
+[\fB\-help\fR|\fB\-h\fR|\fB\-?\fR] [\fB\-impress\fR] [\fB\-invisible\fR] 
[\fB\-infilter="<filter>"\fR]
+[\fB\-math\fR] [\fB\-minimized\fR] [\fB\-n \fIfile\fR]... [\fB\-nodefault\fR]
+[\fB\-nolockcheck\fR] [\fB\-nologo\fR] [\fB\-norestore\fR]
+[\fB\-o \fIfile\fR]... [\fB\-p \fIfile\fR...]
+[\fB\-print\-to\-file [\-printer\-name printer_name] [\-outdir output_dir] file]...
+[\fB\-pt \fIprintername\fR \fIfile\fR...]
+[\fB\-show \fIImpress file\fR]... [\fB\-unaccept=\fIaccept\-string\fR]
+[\fB\-terminate_after_init\fR] [\fB\-view \fIfile\fR]... [\fB\-web\fR]
+[\fB\-writer\fR]  [\fIfile\fR...]
+.br
+.B lobase
+.br
+.B localc
+.br
+.B lodraw
+.br
+.B lofromtemplate
+.br
+.B loimpress
+.br
+.B lomath
+.br
+.B loweb
+.br
+.B lowriter
+.br
+
+.SH DESCRIPTION
+LibreOffice (LO for short) is a multi-platform office productivity suite.
+It was derived from OpenOffice.org 3.3 Beta on September 28, 2010.
+
+\fBlibreoffice\fR is a shell script that sets up the environment and
+passes the command line arguments to the \fBsoffice.bin\fR binary.
+
+Alternatively, the following helper scripts start the respective module:
+
+sbase, scalc, sdraw, simpress, smath, sofficerc, spadmin, swriter
+
+.SH OPTIONS
+.TP
+\fB\-accept=\fIaccept\-string\fR
+Specify a UNO connect-string to create a UNO acceptor through which other
+programs can connect to access the API.
+
+.TP
+\fB\-base\fR
+Starts the wizard for a new Base document.
+
+.TP
+\fB\-calc\fR
+Starts with a new Calc document.
+
+.TP
+\fB\-convert\-to\fR output_file_extension[:output_filter_name] [\-outdir output_dir] \fIfile\fR...
+Batch converts files.
+If \fI-outdir\fR is not specified then the current working directory is used as the output 
directory
+for the converted files.
+
+Examples:
+
+\fB\-convert\-to\fR pdf *.doc
+
+Converts all .doc files to PDFs.
+
+\fB\-convert\-to\fR pdf:writer_pdf_Export \-outdir /home/user *.doc
+
+Converts all .doc files to PDFs using the settings in the Writer PDF export dialog and saving them
+in /home/user.
+
+.TP
+\fB\-display \fIdisplay\fR
+This option specifies the X server to use; see \fBX\fR(7)
+
+.TP
+\fB\-draw\fR
+Starts with a new Draw document.
+
+.TP
+\fB\-global\fR
+Starts with a new Global document.
+
+.TP
+\fB\-headless\fR
+Starts in "headless mode", which allows using the application without user a
+interface.
+
+This special mode can be used when the application is controlled by external
+clients via the API.
+
+It implies \-invisible and strictly ignores any GUI environment.
+\-quickstart does not work with this parameter.
+
+.TP
+\fB\-help\fR|\fB\-h\fR|\fB\-?\fR
+Lists LibreOffice command line parameters.
+
+.TP
+\fB\-impress\fR
+Starts with a new Impress document.
+
+.TP
+\fB\-invisible\fR
+Starts in invisible mode.
+
+Neither the start\-up logo nor the initial program window will be visible.
+LO can be controlled and documents and dialogs can be opened via the API.
+
+When started with this parameter, it can only be quit using the taskmanager (Windows)
+or the kill command (UNIX based systems).
+
+\-quickstart does not work with this parameter.
+
+.TP
+\fB\-infilter="<filter>"\fR
+Force an input filter type if possible.
+For example -infilter="Calc Office Open XML" only 
+
+.TP
+\fB\-math\fR
+Starts with a new Math document.
+
+.TP
+\fB\-minimized\fR
+Keeps the splash screen minimized.
+
+.TP
+\fB\-n \fItemplate\fR...
+Creates the a new document from the given templates.
+
+.TP
+\fB\-nodefault\fR
+Starts LO without creating an new document.
+The next time you start LO, the welcome screen is show.
+
+It's used together with \fB\-nologo\fR by quick starters. Note that \fB\-quickstart\fR
+has no longer been supported since OpenOffice.org 2.0.0.
+
+.TP
+\fB\-nolockcheck\fR
+Disables the check for remote instances using the installation.
+
+.TP
+\fB\-nologo\fR
+Disables the splash screen at program start.
+
+.TP
+\fB\-norestore\fR
+Disables restart and file recovery after a system crash. It is possible that LO
+will try to restore a file it keeps crashing on, if that happens \fB\-norestore\fR
+is the only way to start LO.
+
+.TP
+\fB\-nosplash\fR
+Disables the splash screen at program start.
+
+.TP
+\fB\-o \fIfile\fR...
+Opens the given files for editing, even templates.
+
+Without \fb\-o\fR a template file would create a new document derived from that template.
+
+.TP
+\fB\-p \fIfile\fR...
+Prints the given files to the default printer and ends. The splash screen
+does not appear.
+
+If the file name contains spaces, then it must be enclosed in quotation marks.
+
+.TP
+\fB\-print\-to\-file [\-printer\-name printer_name] [\-outdir output_dir] file...
+Batch print files to file.
+If \-printer\-name is not specified the default printer is used.
+If \-outdir is not specified then the current working directory is used as the output directory
+for the converted files.
+
+Examples:
+
+\-print\-to\-file *.doc
+
+Prints all .doc files to the current working directory using the default printer.
+
+\-print\-to\-file \-printer\-name nasty_lowres_printer \-outdir /home/user *.doc
+
+Prints all .doc files to /home/user directory using the nasty_lowres_printer.
+
+.TP
+\fB\-pt \fIprintername\fR \fIfile\fR...
+Prints the given files to the printer \fIprintername\fR and ends. The splash
+screen does not appear.
+
+If a file name contains spaces, then it must be enclosed in quotation marks.
+
+.TP
+\fB\-quickstart \fB\-quickstart=no
+Starts LO with it's quick starter.
+\fB\-quickstart disable the quick starter.
+
+Does not work with \-invisible or \-headless.
+
+.TP
+\fB\-show \fIImpress file\fR...
+Opens the given Impress files, starts the presentation and quits after they have finished.
+
+.TP
+\fB\-unaccept=\fIaccept\-string\fR
+Closes an acceptor that was created with \fB\-accept\fR option.
+
+Use \fB\-unaccept\fR=\fIall\fR to close all open acceptors.
+
+.TP
+\fB\-terminate_after_init\fR
+Starts LO and terminates after it registers some UNO services.
+Doesn't show the splash during startup.
+
+.TP
+\fB\-view \fIfile\fR...
+Opens the given files read-only creating a temporary copy of them at $TMPDIR.
+
+.TP
+\fB\-web\fR
+Starts with a new HTML document.
+
+.TP
+\fB\-writer\fR
+Starts with a new Writer document.
+
+.SH TROUBLESHOOTING PROBLEMS
+See \fBhttp://wiki.documentfoundation.org/BugReport\fR for more details on how to report
+bugs in LibreOffice.
+.SH SEE ALSO
+.BR http://www.documentfoundation.org/
+
+.SH AUTHOR
+This manual page was created by Rene Engelhard <rene@debian.org> for
+the Debian GNU/Linux Distribution, because the original package does not have
+one. It was updated for Novell by Petr Mladek <petr.mladek@novell.com> and
+adapted for LibreOffice by Philipp Weissenbacher <philipp.weissenbacher@gmail.com>.
diff --git a/sysui/desktop/man/unopkg.1 b/sysui/desktop/man/unopkg.1
new file mode 100644
index 0000000..b98a30d
--- /dev/null
+++ b/sysui/desktop/man/unopkg.1
@@ -0,0 +1,80 @@
+.TH unopkg "1" "2008-03-18" "LibreOffice Extension Manager" "User Command"
+.SH "Name"
+unopkg \- LibreOffice Extension Manager
+.SH SYNOPSIS
+.B unopkg
+[\fBadd\fR] <\fIoptions\fR> \fIextension-path...\fR
+.br
+.B unopkg
+[\fBremove\fR] <\fIoptions\fR> \fIextension-identifier...\fR
+.br
+.B unopkg
+[\fBlist\fR] <\fIoptions\fR> \fIextension-identifier...\fR
+.br
+.B unopkg
+[\fBreinstall\fR] <\fIoptions\fR>
+.br
+.B unopkg
+[\fBgui\fR]
+.br
+.B unopkg
+[\fB--help\fR|\fB-h\fR]
+
+.SH DESCRIPTION
+LibreOffice is a fully featured office suite for the daily use with all
+features you would normally expect in an office suite.
+
+There exists many LibreOffice extensions all over the word. For example, see
+\fBhttp://extensions.services.openoffice.org/\fR
+
+This tool allows to manage the extensions from the command line.
+
+.SH SUB\-COMMANDS
+.TP
+\fBadd\fR
+add the given extensions
+.TP
+\fBremove\fR
+remove extensions by the given identifiers
+.TP
+\fBreinstall\fR
+reinstall all deployed extensions (only for experts)
+.TP
+\fBlist\fR
+list information about the deployed extensions
+.TP
+\fBgui\fR
+raise Extension Manager Graphical User Interface (GUI)
+
+.SH OPTIONS
+.TP
+\fB\-\-help\fR|\fB\-h\fR
+display help and exit
+.TP
+\fB\-\-version\fR|\fB\-V\fR
+output version information and exit
+.TP
+\fB--verbose\fR|\fB\-v\fR
+verbose output
+.TP
+\fB\-\-force\fR|\fB\-f\fR
+force overwriting existing extensions
+.TP
+\fB\-\-log\-file\fR <\fIfile\fR>
+custom log file; the default one is <cache-dir>/log.txt
+.TP
+\fB\-\-shared\fR|\fB\-f\fR
+operate on the system installation deployment context; use only when no
+concurrent Office process(es) are running! (only for experts)
+.TP
+\fB\-\-deployment\-context\fR <\fIcontext\fR>
+operate on explicit deployment context (only for experts)
+
+
+.SH TROUBLESHOOTING PROBLEMS
+See \fBhttp://wiki.documentfoundation.org/BugReport\fR for more details about how to report
+bugs in LibreOffice.
+.SH SEE ALSO
+.BR http://www.documentfoundation.org/
+.SH AUTHOR
+This manual page was created by Petr Mladek <pmladek@suse.cz>.
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 365155f..3c4a678 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -43,7 +43,7 @@ fi
 
 mkdir -p ${DESTDIR}/usr/bin
 
-office_prefix=/opt
+test -n "$OFFICE_PREFIX" && office_prefix="$OFFICE_PREFIX" || office_prefix=/opt
 office_root=${office_prefix}/${PREFIX}
 
 #this symlink is needed to have the API boostrap functions running right
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.