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

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