Kaydet (Commit) 60ab748d authored tarafından orbea's avatar orbea Kaydeden (comit) Thorsten Behrens

Respect --bindir..

Change-Id: I2ed73a296b813de722156c69ac64cf9d6cff199d
Reviewed-on: https://gerrit.libreoffice.org/55197Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarRene Engelhard <rene@debian.org>
üst 3f31455f
......@@ -7,34 +7,33 @@ fi
PRODUCTVERSION_NODOT=`echo $PRODUCTVERSION | sed -e "s/\.//"`
mkdir -p $DESTDIR$PREFIXDIR/bin
mkdir -p "$DESTDIR$BINDIR"
create_wrapper()
{
echo "Install $PREFIXDIR/bin/$1"
echo "Install $BINDIR/$1"
if test -L "$DESTDIR$PREFIXDIR/bin/$1" ; then
# do not overwrite $PREFIXDIR/bin/libreoffice symlink created by create_tree.sh
if test -L "$DESTDIR$BINDIR/$1" ; then
# do not overwrite $BINDIR/libreoffice symlink created by create_tree.sh
# the symlink is necessary by java UNO components to find
# the UNO installation using $PATH; this function used to be provided
# by $PREFIXDIR/bin/soffice symlink, see
# by $BINDIR/soffice symlink, 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
echo " skip already existing symlink $PREFIXDIR/bin/$1"
echo " skip already existing symlink $BINDIR/$1"
else
mkdir -p $DESTDIR$PREFIXDIR/bin
cat <<EOT >$DESTDIR$PREFIXDIR/bin/$1
mkdir -p "$DESTDIR$BINDIR"
cat <<EOT >"$DESTDIR$BINDIR/$1"
#!/bin/sh
$INSTALLDIR/program/$2 $3 "\$@"
EOT
chmod 755 $DESTDIR$PREFIXDIR/bin/$1
chmod 755 "$DESTDIR$BINDIR/$1"
fi
# put into file list
test -f "$DESTDIR/$4" && echo "$PREFIXDIR/bin/$1" >>$DESTDIR/$4
test -f "$DESTDIR/$4" && echo "$BINDIR/$1" >>$DESTDIR/$4
}
create_man_link()
......@@ -165,15 +164,15 @@ add_wrapper unopkg unopkg "" "unopkg" ""
# there are two more desktop files for optional filters
test -f $DESTDIR/gid_Module_Optional_Xsltfiltersamples && echo "$PREFIXDIR/share/applications/libreoffice-xsltfilter.desktop" >>"$DESTDIR/gid_Module_Optional_Xsltfiltersamples"
# $PREFIXDIR/bin/ooffice symlink is necessary by java UNO components to find
# $BINDIR/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 $DESTDIR$PREFIXDIR/bin/soffice
test -f $DESTDIR/gid_Module_Root_Brand && echo "$PREFIXDIR/bin/soffice" >>$DESTDIR/gid_Module_Root_Brand
ln -sf "$INSTALLDIR/program/soffice" "$DESTDIR$BINDIR/soffice"
test -f $DESTDIR/gid_Module_Root_Brand && echo "$BINDIR/soffice" >>$DESTDIR/gid_Module_Root_Brand
# create bash completion
mkdir -p $DESTDIR/usr/share/bash-completion/completions
......
......@@ -35,6 +35,7 @@ export AVAHI_CFLAGS=$(gb_SPACE)@AVAHI_CFLAGS@
export AVAHI_LIBS=$(gb_SPACE)@AVAHI_LIBS@
export LIBATOMIC_OPS_CFLAGS=$(gb_SPACE)@LIBATOMIC_OPS_CFLAGS@
export LIBATOMIC_OPS_LIBS=$(gb_SPACE)@LIBATOMIC_OPS_LIBS@
export BINDIR=@BINDIR@
export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@
export BOOST_LOCALE_LIB=@BOOST_LOCALE_LIB@
......
......@@ -12216,6 +12216,9 @@ AC_SUBST(MANDIR)
DOCDIR=[$(eval echo $(eval echo $docdir))]
AC_SUBST(DOCDIR)
BINDIR=[$(eval echo $(eval echo $bindir))]
AC_SUBST(BINDIR)
INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
AC_SUBST(INSTALLDIR)
......
......@@ -52,19 +52,19 @@ if [ "${GNOMEDIR}" ]; then
chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}".*
fi
mkdir -p "${DESTDIR}/${PREFIXDIR}/bin"
mkdir -p "${DESTDIR}/${BINDIR}"
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
ln -sf "${office_root}/program/soffice" "${DESTDIR}/${PREFIXDIR}/bin/${PREFIX}"
ln -sf "${office_root}/program/soffice" "${DESTDIR}/${BINDIR}/${PREFIX}"
if test "${PREFIX}" != libreoffice${PRODUCTVERSION} -a "${PREFIX}" != libreofficedev${PRODUCTVERSION} ; then
# compat symlinks
mkdir -p "${DESTDIR}${office_prefix}"
ln -sf libreoffice${PRODUCTVERSION} "${DESTDIR}${office_root}"
ln -sf /${PREFIXDIR}/bin/${PREFIX} "${DESTDIR}/${PREFIXDIR}/bin/libreoffice${PRODUCTVERSION}"
ln -sf /${BINDIR}/${PREFIX} "${DESTDIR}/${BINDIR}/libreoffice${PRODUCTVERSION}"
fi
test "${PREFIX}" = libreofficedev${PRODUCTVERSION} && mime_def_file="libreofficedev${PRODUCTVERSION}.xml" || mime_def_file="libreoffice${PRODUCTVERSION}.xml"
......
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