summaryrefslogtreecommitdiff
path: root/bin/distro-install-sdk
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-07-08 12:01:56 +0200
committerPetr Mladek <pmladek@suse.cz>2011-07-11 20:30:31 +0200
commit8124bdf39b719c66e61355c0bc64f8235c4fbec0 (patch)
treea7a8f52492191bdea7e142358698fab5a2081817 /bin/distro-install-sdk
parent19111fe556a28befac2bc364fd4d8b5ec5c8c348 (diff)
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: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen@gmail.com>
Diffstat (limited to 'bin/distro-install-sdk')
-rwxr-xr-xbin/distro-install-sdk86
1 files changed, 86 insertions, 0 deletions
diff --git a/bin/distro-install-sdk b/bin/distro-install-sdk
new file mode 100755
index 000000000000..b147b4522d2f
--- /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