summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-07 10:50:34 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-07 15:23:52 +0200
commit35fc8885760030cb78b856a23ad02f5148268296 (patch)
tree3802048cb99bd4e51c37755f898bbefc011ed7d8
parenttdf#112177 remove incorrect constraint for Calc function NPER. (diff)
downloadcore-35fc8885760030cb78b856a23ad02f5148268296.tar.gz
core-35fc8885760030cb78b856a23ad02f5148268296.zip
Include all .desktop files in the Flatpak
...GNOME Software reportedly is fine with that now. Change-Id: I418fc60a3215078109d3d8e9f426f98fdf37322b (cherry picked from commit 1b85d725663a7d7546549e6b78ea43bea1cde7b9) Reviewed-on: https://gerrit.libreoffice.org/42051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rwxr-xr-xsolenv/bin/assemble-flatpak.sh26
1 files changed, 11 insertions, 15 deletions
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index e73848b6e050..d514c3ee41fc 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -15,29 +15,25 @@ set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
-## libreoffice-startcenter.desktop -> org.libreoffice.LibreOffice.desktop,
-## combining all libreoffice-*.desktop MimeType= lines:
+## libreoffice-*.desktop -> org.libreoffice.LibreOffice-*.desktop:
mkdir /app/share
mkdir /app/share/applications
-my_mimetypes=$(awk -d 'BEGIN { FS="="; ORS=""; semi=0 }; \
- /^MimeType=/ && length($2) \
- { if (semi) print ";"; print $2; semi = match($2, ";$") == 0 }' \
- "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop)
-sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \
- -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice-/' \
- -e 's|^MimeType=.*$|MimeType='"$my_mimetypes"'|' \
- "${PREFIXDIR?}"/share/applications/libreoffice-startcenter.desktop \
- >/app/share/applications/org.libreoffice.LibreOffice.desktop
+for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
+do
+ sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \
+ -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice-/' "$i" \
+ >/app/share/applications/org.libreoffice.LibreOffice-"${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
+done
-## icons/hicolor/*/apps/libreoffice-startcenter.* ->
-## icons/hicolor/*/apps/org.libreoffice.LibreOffice-startcenter.*:
+## icons/hicolor/*/apps/libreoffice-* ->
+## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*:
mkdir /app/share/icons
-for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-startcenter.*
+for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-*
do
mkdir -p \
"$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"
cp -a "$i" \
- "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-startcenter."${i##*/apps/libreoffice-startcenter.}"
+ "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}"
done
## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various