summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-09 14:37:21 +0200
committerAndras Timar <andras.timar@collabora.com>2018-05-15 10:15:13 +0200
commit9bc29be8fb6988456ba88a719f134f6c29c604e6 (patch)
treebebcceb0daac39d4b0802a896a2205ed982f427a /solenv
parentcda11986dfb9934e49ab4fedaed0dfebbc172a2c (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/54031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 33af02a486ee911ba68608ec6f4f0b06dd742473)
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: