Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


The below breaks e. g. Linux --with-package-format=rpm builds (cf. <http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&full-log=1402500005.29267>), because e. g. sysui/desktop/freedesktop/freedesktop-menus.spec still assumes *.desktop files at /usr/share/applications while sysui/desktop/share/create_tree.sh now assumes them at ${PREFIXDIR}/share/applications, where configure.ac gives PREFIXDIR=/usr/local at least for me.

No idea what the right fix is, whether the sysui/desktop/ *.specs need to be adapted to PREFIXDIR or whether those /usr/share paths should be left hardcoded.

Stephan

On 06/11/2014 03:42 PM, Baptiste Daroussin wrote:
  bin/distro-install-desktop-integration |    1 +
  sysui/desktop/share/create_tree.sh     |   20 ++++++++++----------
  2 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit d2cc121e0798a007a6e0409b09c16ce747ab959f
Author: Baptiste Daroussin <bapt@FreeBSD.org>
Date:   Wed Jun 11 11:04:07 2014 +0200

     Do not hard code /usr

     Not all operation system install packages into /usr, make sure
     create-tree.sh do respect the PREFIX variable

     Change-Id: Iff358c9e22fb8969afaef2bb96e1f91eb7e91123
     Reviewed-on: https://gerrit.libreoffice.org/9730
     Tested-by: Michael Stahl <mstahl@redhat.com>
     Reviewed-by: Michael Stahl <mstahl@redhat.com>

diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
index 40ad98c..4cf652d 100755
--- a/bin/distro-install-desktop-integration
+++ b/bin/distro-install-desktop-integration
@@ -113,6 +113,7 @@ sed -i \
      export ICON_SOURCE_DIR=$builddir/sysui/desktop/icons
      export PRODUCTVERSION=
      export KDEMAINDIR=$PREFIXDIR
+    export PREFIXDIR=${PREFIXDIR}
      export GNOMEDIR=$PREFIXDIR
      export GNOME_MIME_THEME=hicolor
      bash ./create_tree.sh
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 2221a46..c6be0bb 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -57,33 +57,33 @@ if [ "${GNOMEDIR}" ]; then
    chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}".*
  fi

-mkdir -p "${DESTDIR}/usr/bin"
+mkdir -p "${DESTDIR}/${PREFIXDIR}/bin"

  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}/usr/bin/${PREFIX}"
+ln -sf "${office_root}/program/soffice" "${DESTDIR}/${PREFIXDIR}/bin/${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 /usr/bin/${PREFIX} "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}"
+    ln -sf /${PREFIXDIR}/bin/${PREFIX} "${DESTDIR}/${PREFIXDIR}/bin/libreoffice${PRODUCTVERSION}"
  fi

  test "${PREFIX}" = libreofficedev${PRODUCTVERSION} && mime_def_file="libreofficedev${PRODUCTVERSION}.xml" 
|| mime_def_file="libreoffice${PRODUCTVERSION}.xml"
-mkdir -p "${DESTDIR}/usr/share/mime/packages"
-cp openoffice.org.xml "${DESTDIR}/usr/share/mime/packages/$mime_def_file"
-chmod 0644 "${DESTDIR}/usr/share/mime/packages/$mime_def_file"
+mkdir -p "${DESTDIR}/${PREFIXDIR}/share/mime/packages"
+cp openoffice.org.xml "${DESTDIR}/${PREFIXDIR}/share/mime/packages/$mime_def_file"
+chmod 0644 "${DESTDIR}/${PREFIXDIR}/share/mime/packages/$mime_def_file"

-mkdir -p "${DESTDIR}/usr/share/applications"
+mkdir -p "${DESTDIR}/${PREFIXDIR}/share/applications"
  for i in `cat launcherlist`; do
-  ln -sf "${office_root}/share/xdg/${i}" "${DESTDIR}/usr/share/applications/${PREFIX}-${i}"
+  ln -sf "${office_root}/share/xdg/${i}" 
"${DESTDIR}/${PREFIXDIR}/share/applications/${PREFIX}-${i}"
  done

-mkdir -p "${DESTDIR}/usr/share/appdata"
+mkdir -p "${DESTDIR}/${PREFIXDIR}/share/appdata"
  for i in base calc draw impress writer; do
-    cp "${APPDATA_SOURCE_DIR}/libreoffice-${i}.appdata.xml" 
"${DESTDIR}/usr/share/appdata/${PREFIX}-${i}.appdata.xml"
+    cp "${APPDATA_SOURCE_DIR}/libreoffice-${i}.appdata.xml" 
"${DESTDIR}/${PREFIXDIR}/share/appdata/${PREFIX}-${i}.appdata.xml"
  done



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.