diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-09-07 10:50:34 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-09-07 13:47:01 +0200 |
commit | 1b85d725663a7d7546549e6b78ea43bea1cde7b9 (patch) | |
tree | 89a777ccb9c3123399a31f9b692f9d9e7aeebceb /solenv/bin | |
parent | 003c2cfaa258e204402a366a105366da74e220a2 (diff) |
Include all .desktop files in the Flatpak
...GNOME Software reportedly is fine with that now.
Change-Id: I418fc60a3215078109d3d8e9f426f98fdf37322b
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/assemble-flatpak.sh | 26 |
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 |