summaryrefslogtreecommitdiff
path: root/solenv/bin/assemble-flatpak.sh
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-09 14:41:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-09 21:25:34 +0200
commit727bfa2c87db170483c1e4ae895174295b070c77 (patch)
tree4d8fb9f94fd586b18cfd4efa1ce6cfeef84720c6 /solenv/bin/assemble-flatpak.sh
parent0b0bc5eb77ac735573482dddd6814c9763f8c6e1 (diff)
Merge in Flatpak improvements
...from <https://github.com/flathub/org.libreoffice.LibreOffice/>: commit 7a2393f5fcab8c6938180c4718f2c61acd495528 Author: Robert McQueen <rob@endlessm.com> Date: Tue Apr 3 10:41:22 2018 +0100 port to freedesktop.org 1.6 runtime Gtk+3/GIO/etc dependencies used by LO in "GNOME" mode are actually included in the freedesktop.org runtime. Try to build against fd.o by downgrading gst-libav (fd.o has gst 1.10 rather than gnome's 1.12), bundling dbus-glib and disable Gtk+ 2. commit 42650da01f270e86bfb40035a9194b23ccf24c4c Author: Robert McQueen <rob@endlessm.com> Date: Tue Apr 3 11:23:27 2018 +0100 fix up LD_LIBRARY_PATH with gcc7 Append to library path rather than resetting it (causes build failures due to overriding /app/lib). commit 3e4c655294c8124cb54e1c651ec4dc1230b8151e Author: Robert McQueen <rob@endlessm.com> Date: Tue Apr 3 11:25:02 2018 +0100 fixup solenv/bin/assemble_flatpak.sh Use mkdir -p to be robust to other modules (ie dbus-glib) creating some of the paths before we do. commit d1d449ffa837b1de876f524494dbce09ec92ce73 Author: Robert McQueen <rob@endlessm.com> Date: Wed Apr 4 15:50:49 2018 +0100 split resource/registry data into Locales extension Move the language-specific data into the /app/share/runtime path which flatpak-builder splits into the Locale extension if we re-enable separate-locales. We symlink the original locations back to these paths, which means we have dangling symlinks depending on which Locale sutpaths are installed. Include Stephan Bergmann's patch from https://gerrit.libreoffice.org/#/c/52381/ to make the configmgr robust to such dangling links. commit ad6674f166c68fb79e19d80950a104a0a33f81dc Author: Robert McQueen <rob@endlessm.com> Date: Wed Apr 4 16:05:28 2018 +0100 make locale split glob more specific This loop will fail if the share/registry/res folder gains any .xcd files which are not named fcfg_langpack_* or registry_* so just to be safe, only glob these files. Change-Id: Icd41d7077b9f308dbb196927715b210328709662 Reviewed-on: https://gerrit.libreoffice.org/52642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/bin/assemble-flatpak.sh')
-rwxr-xr-xsolenv/bin/assemble-flatpak.sh35
1 files changed, 31 insertions, 4 deletions
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index 67cf47bad33d..b0f718a5091f 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -16,8 +16,7 @@ set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
## libreoffice-*.desktop -> org.libreoffice.LibreOffice-*.desktop:
-mkdir /app/share
-mkdir /app/share/applications
+mkdir -p /app/share/applications
for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
do
sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \
@@ -29,7 +28,7 @@ mv /app/share/applications/org.libreoffice.LibreOffice-startcenter.desktop \
## icons/hicolor/*/apps/libreoffice-* ->
## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*:
-mkdir /app/share/icons
+mkdir -p /app/share/icons
for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-*
do
mkdir -p \
@@ -38,11 +37,39 @@ do
"$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}"
done
+mkdir -p /app/share/runtime/locale
+for i in $(ls /app/libreoffice/program/resource)
+do
+ lang="${i%[_@]*}"
+ mkdir -p /app/share/runtime/locale/"${lang}"/resource
+ mv /app/libreoffice/program/resource/"${i}" /app/share/runtime/locale/"${lang}"/resource
+ ln -s ../../../share/runtime/locale/"${lang}"/resource/"${i}" /app/libreoffice/program/resource
+done
+
+for i in /app/libreoffice/share/registry/Langpack-*.xcd /app/libreoffice/share/registry/res/{fcfg_langpack,registry}_*.xcd
+do
+ basename="$(basename "${i}" .xcd)"
+ lang="${basename#Langpack-}"
+ lang="${lang#fcfg_langpack_}"
+ lang="${lang#registry_}"
+
+ # ship the base app with at least one Langpack/fcfg_langpack
+ if [ "${lang}" = "en-US" ]
+ then
+ continue
+ fi
+
+ lang="${lang%-*}"
+ mkdir -p /app/share/runtime/locale/"${lang}"/registry
+ mv "${i}" /app/share/runtime/locale/"${lang}"/registry
+ ln -rs /app/share/runtime/locale/"${lang}"/registry/"${basename}".xcd "${i}"
+done
+
## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various
## inst/share/appdata/libreoffice-*.appdata.xml (at least recent GNOME Software
## doesn't show more than five screenshots anyway, so restrict to one each from
## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base):
-mkdir /app/share/appdata
+mkdir -p /app/share/appdata
cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">