Blame SOURCES/0001-Flatpak-Add-app-bin-libreoffice-app-libreoffice-prog.patch

2654e0
From acca5c87e73255db350a02d13bf34a62efaf9c93 Mon Sep 17 00:00:00 2001
2654e0
From: Stephan Bergmann <sbergman@redhat.com>
2654e0
Date: Tue, 21 Apr 2020 14:07:24 +0200
2654e0
Subject: [PATCH] Flatpak: Add /app/bin/libreoffice ->
2654e0
 /app/libreoffice/program/soffice symlink
2654e0
2654e0
Which removes the need to rewrite the
2654e0
2654e0
  Exec=${UNIXBASISROOTNAME}
2654e0
2654e0
lines from sysui/desktop/menus/*.desktop, and helps to harmonize the plain
2654e0
Flatpak build with the one done from Fedora RPMs (see
2654e0
<https://src.fedoraproject.org/flatpaks/libreoffice>).
2654e0
2654e0
(Also change the manifest command from an absolute path to a filename relative
2654e0
to PATH.  It is not clear to me which one would be better or more conventional,
2654e0
but at least <https://docs.flatpak.org/en/latest/manifests.html> also uses just
2654e0
a filename in its example.)
2654e0
2654e0
Change-Id: I69c380b84503bf3d85801093fb92567852ceb00b
2654e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92837
2654e0
Tested-by: Jenkins
2654e0
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2654e0
---
2654e0
 solenv/bin/assemble-flatpak.sh | 4 ++--
2654e0
 solenv/flatpak-manifest.in     | 2 +-
2654e0
 2 files changed, 3 insertions(+), 3 deletions(-)
2654e0
2654e0
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
2654e0
index b4bce2d4d172..0738fcd59ad2 100755
2654e0
--- a/solenv/bin/assemble-flatpak.sh
2654e0
+++ b/solenv/bin/assemble-flatpak.sh
2654e0
@@ -14,13 +14,13 @@
2654e0
 set -e
2654e0
 
2654e0
 cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
2654e0
+ln -s /app/libreoffice/program/soffice /app/bin/libreoffice
2654e0
 
2654e0
 ## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
2654e0
 mkdir -p /app/share/applications
2654e0
 for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
2654e0
 do
2654e0
- sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \
2654e0
-  -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
2654e0
+ sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
2654e0
   >/app/share/applications/org.libreoffice.LibreOffice."${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
2654e0
 done
2654e0
 mv /app/share/applications/org.libreoffice.LibreOffice.startcenter.desktop \
2654e0
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
2654e0
index 9f64a142dd68..754b6b6dbbe1 100644
2654e0
--- a/solenv/flatpak-manifest.in
2654e0
+++ b/solenv/flatpak-manifest.in
2654e0
@@ -6,7 +6,7 @@
2654e0
     "sdk-extensions": [
2654e0
         "org.freedesktop.Sdk.Extension.openjdk11"
2654e0
     ],
2654e0
-    "command": "/app/libreoffice/program/soffice",
2654e0
+    "command": "libreoffice",
2654e0
     "modules": [
2654e0
         {
2654e0
             "name": "openjdk",
2654e0
-- 
2654e0
2.26.0
2654e0