Kaydet (Commit) 8124bdf3 authored tarafından Petr Mladek's avatar Petr Mladek

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?
Signed-off-by: 's avatarMichael Meeks <michael.meeks@novell.com>
Signed-off-by: 's avatarMiklos Vajna <vmiklos@frugalware.org>
Signed-off-by: 's avatarBjoern Michaelsen <bjoern.michaelsen@gmail.com>
üst 19111fe5
......@@ -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 && \
......
# 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
#!/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
#!/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
This diff is collapsed.
#!/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
#!/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);
#!/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
......@@ -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 ===================================================================
......@@ -7833,6 +7864,14 @@ location (/usr/share/java), specify its pathname via
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 ===================================================================
......@@ -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
......
......@@ -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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment