summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-09 14:37:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-09 16:38:42 +0200
commit64293a27256699d9400605a9f312f7663bca97fb (patch)
treed923f36f0b0c6951ef0c6eddb5f956ab2b612fe5 /solenv
parent6e890cf0a75e937128260c91ea0183b826d7059c (diff)
Merge in Flatpak improvements
...from <https://github.com/flathub/org.libreoffice.LibreOffice/>: commit 945f6caad87658b1df1e8918bd5f64939058ab7f (origin/desktop-integration) Author: Robert McQueen <rob@endlessm.com> Date: Fri Apr 27 16:54:30 2018 +0100 clean up desktop integration - don't register MIME handler for text/plain (Flatpak appears first in XDG_DATA_DIRS so otherwise we "steal" the default text editor association) - copy the icons app into the theme with both their original libreoffice-* name as well as the org.libreoffice name needed by Flatpak, which fixes the window icons - append the appdata for the separate apps (Base, Draw, etc) to the appdata XML we export for Flatpak, so they are visible in software centers etc Change-Id: Ia086071671b9ff5a8b07c55a822240f9e8fbb8d3 Reviewed-on: https://gerrit.libreoffice.org/54030 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/assemble-flatpak.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index b0f718a5091f..2d988084cb1c 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -26,6 +26,10 @@ done
mv /app/share/applications/org.libreoffice.LibreOffice-startcenter.desktop \
/app/share/applications/org.libreoffice.LibreOffice.desktop
+# Flatpak .desktop exports take precedence over system ones due to
+# the order of XDG_DATA_DIRS - re-associating text/plain seems a bit much
+sed -i "s/text\/plain;//" /app/share/applications/org.libreoffice.LibreOffice-writer.desktop
+
## icons/hicolor/*/apps/libreoffice-* ->
## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*:
mkdir -p /app/share/icons
@@ -34,6 +38,8 @@ 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/}")"/"$(basename "$i")"
+ cp -a "$i" \
"$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}"
done
@@ -133,6 +139,13 @@ cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
</component>
EOF
+# append the appdata for the different components
+for i in "${PREFIXDIR?}"/share/appdata/libreoffice-*.appdata.xml
+do
+ sed "1 d; s/<id>libreoffice/<id>org.libreoffice.LibreOffice/" "$i" \
+ >>/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
+done
+
## see <https://github.com/flatpak/flatpak/blob/master/app/
## flatpak-builtins-build-finish.c> for further places where build-finish would
## look for data: