[Libreoffice-commits] core.git: bin/distro-install-desktop-integration config_host.mk.in configure.ac sysui/desktop
orbea
orbea at fredslev.dk
Wed Jun 13 07:47:29 UTC 2018
bin/distro-install-desktop-integration | 27 +++++++++++++--------------
config_host.mk.in | 1 +
configure.ac | 3 +++
sysui/desktop/share/create_tree.sh | 6 +++---
4 files changed, 20 insertions(+), 17 deletions(-)
New commits:
commit 60ab748dcde78a33c1930b758018bf9b3b2650b4
Author: orbea <orbea at fredslev.dk>
Date: Fri Jun 1 12:31:34 2018 -0700
Respect --bindir..
Change-Id: I2ed73a296b813de722156c69ac64cf9d6cff199d
Reviewed-on: https://gerrit.libreoffice.org/55197
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Rene Engelhard <rene at debian.org>
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
index 3b6e5022c0b8..c8988b922f3e 100755
--- a/bin/distro-install-desktop-integration
+++ b/bin/distro-install-desktop-integration
@@ -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
diff --git a/config_host.mk.in b/config_host.mk.in
index 0e3ba4864755..c104f07cb1eb 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -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@
diff --git a/configure.ac b/configure.ac
index 0f236c885723..c0ff933ca4dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 3f24b5fd7bf4..6812d97d9de0 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -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"
More information about the Libreoffice-commits
mailing list