summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@fredslev.dk>2018-06-01 12:31:34 -0700
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-06-13 09:47:04 +0200
commit60ab748dcde78a33c1930b758018bf9b3b2650b4 (patch)
tree039d01603d53d78da77dbc58d8819837956ed0a4
parent3f31455fdd10309ab85fc3d324096698d3f38e5b (diff)
Respect --bindir..
Change-Id: I2ed73a296b813de722156c69ac64cf9d6cff199d Reviewed-on: https://gerrit.libreoffice.org/55197 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Rene Engelhard <rene@debian.org>
-rwxr-xr-xbin/distro-install-desktop-integration27
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac3
-rwxr-xr-xsysui/desktop/share/create_tree.sh6
4 files changed, 20 insertions, 17 deletions
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"