2011-07-08 05:01:56 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-02-29 13:26:13 -06:00
|
|
|
if test -z "${SRC_ROOT}"; then
|
|
|
|
echo "distro-install-clean-up: No environment set!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-07-08 05:01:56 -05:00
|
|
|
|
2011-11-14 08:07:15 -06:00
|
|
|
if test -d $DESTDIR$INSTALLDIR/sdk ; then
|
2011-07-08 05:01:56 -05:00
|
|
|
|
|
|
|
echo "SDK installation clean up"
|
|
|
|
|
|
|
|
# bin potential .orig files
|
2011-11-14 08:07:15 -06:00
|
|
|
find $DESTDIR$INSTALLDIR/sdk -name "*.orig" -exec rm -f {} \;
|
2011-07-08 05:01:56 -05:00
|
|
|
|
|
|
|
# move some SDK directories to the right place according to FHS
|
2011-11-14 08:07:15 -06:00
|
|
|
# note that examples must stay in $DESTDIR$INSTALLDIR/sdk because there are used
|
|
|
|
# relative paths to $DESTDIR$INSTALLDIR/sdk/setting and it does not work via
|
2011-07-08 05:01:56 -05:00
|
|
|
# a symlink
|
|
|
|
mkdir -p $DESTDIR$PREFIXDIR/include
|
|
|
|
mkdir -p $DESTDIR$DATADIR/idl
|
|
|
|
mkdir -p $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk
|
|
|
|
mkdir -p $DESTDIR$DOCDIR/sdk
|
2011-11-14 08:07:15 -06:00
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/include $DESTDIR$PREFIXDIR/include/$INSTALLDIRNAME
|
|
|
|
if [ -d $DESTDIR$INSTALLDIR/sdk/classes ]; then
|
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/classes $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk/classes
|
2011-07-08 05:01:56 -05:00
|
|
|
fi
|
2011-11-14 08:07:15 -06:00
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/idl $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
|
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/docs $DESTDIR$DOCDIR/sdk
|
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/share/readme $DESTDIR$DOCDIR/sdk/readme
|
|
|
|
mv $DESTDIR$INSTALLDIR/sdk/index.html $DESTDIR$DOCDIR/sdk
|
2011-07-08 05:01:56 -05:00
|
|
|
|
|
|
|
# compat symlinks
|
2011-11-14 08:07:15 -06:00
|
|
|
ln -sf $PREFIXDIR/include/$INSTALLDIRNAME $DESTDIR$INSTALLDIR/sdk/include
|
|
|
|
ln -sf $DATADIR/$INSTALLDIRNAME/sdk/classes $DESTDIR$INSTALLDIR/sdk/classes
|
|
|
|
ln -sf $DATADIR/idl/$INSTALLDIRNAME $DESTDIR$INSTALLDIR/sdk/idl
|
|
|
|
ln -sf $DOCDIR/sdk/docs $DESTDIR$INSTALLDIR/sdk/
|
|
|
|
ln -sf $DOCDIR/sdk/index.html $DESTDIR$INSTALLDIR/sdk/index.html
|
|
|
|
ln -sf $INSTALLDIR/sdk/examples $DESTDIR$DOCDIR/sdk/examples
|
2011-07-08 05:01:56 -05:00
|
|
|
|
|
|
|
# fix file list
|
2011-11-14 08:07:15 -06:00
|
|
|
sed -e "s|^\(%dir \)\?$INSTALLDIR/sdk/include|\1$PREFIXDIR/include/$INSTALLDIRNAME|" \
|
|
|
|
-e "s|^\(%dir \)\?$INSTALLDIR/sdk/classes|\1$DATADIR/$INSTALLDIRNAME/sdk/classes|" \
|
|
|
|
-e "s|^\(%dir \)\?$INSTALLDIR/sdk/idl|\1$DATADIR/idl/$INSTALLDIRNAME|" \
|
|
|
|
-e "s|^\(%dir \)\?$INSTALLDIR/sdk/docs|\1$DOCDIR/sdk/docs|" \
|
|
|
|
-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share/readme|\1$DOCDIR/sdk/readme|" \
|
|
|
|
-e "s|^$INSTALLDIR/sdk/index.html$|$DOCDIR/sdk/index.html|" \
|
|
|
|
-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share.*$||" \
|
2011-07-08 05:01:56 -05:00
|
|
|
-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
|
2011-11-14 08:07:15 -06:00
|
|
|
echo "$INSTALLDIR/sdk/include" >>$DESTDIR/gid_Module_Root_SDK
|
|
|
|
echo "$INSTALLDIR/sdk/classes" >>$DESTDIR/gid_Module_Root_SDK
|
|
|
|
echo "$INSTALLDIR/sdk/idl" >>$DESTDIR/gid_Module_Root_SDK
|
|
|
|
echo "$INSTALLDIR/sdk/docs" >>$DESTDIR/gid_Module_Root_SDK
|
|
|
|
echo "$INSTALLDIR/sdk/index.html" >>$DESTDIR/gid_Module_Root_SDK
|
2011-07-08 05:01:56 -05:00
|
|
|
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," \
|
2011-11-14 08:07:15 -06:00
|
|
|
-e "s,@OO_SDK_HOME@,$INSTALLDIR/sdk," \
|
2011-07-08 05:01:56 -05:00
|
|
|
-e "s,@OFFICE_HOME@,$INSTALLDIR," \
|
2011-11-14 08:07:15 -06:00
|
|
|
-e "s,@OO_SDK_URE_HOME@,$INSTALLDIR/ure-link," \
|
2011-07-08 05:01:56 -05:00
|
|
|
-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," \
|
2011-11-14 08:07:15 -06:00
|
|
|
$DESTDIR$INSTALLDIR/sdk/$file.in \
|
|
|
|
> $DESTDIR$INSTALLDIR/sdk/$file
|
|
|
|
chmod 755 $DESTDIR$INSTALLDIR/sdk/$file
|
|
|
|
echo $INSTALLDIR/sdk/$file >>$DESTDIR/gid_Module_Root_SDK
|
2011-07-08 05:01:56 -05:00
|
|
|
done
|
2011-07-28 11:33:58 -05:00
|
|
|
|
2011-07-08 05:01:56 -05:00
|
|
|
# FIXME: I rather set this file to be non-world-writttable for now, i#64812
|
2011-11-14 08:07:15 -06:00
|
|
|
chmod go-w $DESTDIR$INSTALLDIR/sdk/settings/component.uno.map
|
2011-07-08 05:01:56 -05:00
|
|
|
fi
|