Fix appdata, desktop, and icon files for the Flatpak build

...by reusing as much as possible the existing upstream logic used for the LO
Flathub build

(cherry picked from commit f41687290dfe86f835013db93f08f92eb6e62c06)
f41
Stephan Bergmann 5 years ago
parent 20ec5738ef
commit 8461bb43d9

@ -0,0 +1,64 @@
From acca5c87e73255db350a02d13bf34a62efaf9c93 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 21 Apr 2020 14:07:24 +0200
Subject: [PATCH] Flatpak: Add /app/bin/libreoffice ->
/app/libreoffice/program/soffice symlink
Which removes the need to rewrite the
Exec=${UNIXBASISROOTNAME}
lines from sysui/desktop/menus/*.desktop, and helps to harmonize the plain
Flatpak build with the one done from Fedora RPMs (see
<https://src.fedoraproject.org/flatpaks/libreoffice>).
(Also change the manifest command from an absolute path to a filename relative
to PATH. It is not clear to me which one would be better or more conventional,
but at least <https://docs.flatpak.org/en/latest/manifests.html> also uses just
a filename in its example.)
Change-Id: I69c380b84503bf3d85801093fb92567852ceb00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92837
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
solenv/bin/assemble-flatpak.sh | 4 ++--
solenv/flatpak-manifest.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index b4bce2d4d172..0738fcd59ad2 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -14,13 +14,13 @@
set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
+ln -s /app/libreoffice/program/soffice /app/bin/libreoffice
## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
mkdir -p /app/share/applications
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" \
+ sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
>/app/share/applications/org.libreoffice.LibreOffice."${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
done
mv /app/share/applications/org.libreoffice.LibreOffice.startcenter.desktop \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 9f64a142dd68..754b6b6dbbe1 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -6,7 +6,7 @@
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.openjdk11"
],
- "command": "/app/libreoffice/program/soffice",
+ "command": "libreoffice",
"modules": [
{
"name": "openjdk",
--
2.26.0

@ -0,0 +1,340 @@
From 54f42e1b75dd795f9d53dce181397f114eeae21b Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 28 Apr 2020 16:43:31 +0200
Subject: [PATCH] Restructure solenv/bin/assemble-flatpak.sh
...so that parts of it can be reused by the Flatpak build done from Fedora RPMs
(see <https://src.fedoraproject.org/flatpaks/libreoffice>). The reused parts
are split out into solenv/bin/assemble-flatpak-*.sh files.
(I can't remember any specific reason why I added the <releases> section to the
Flathub org.libreoffice.LibreOffice.appdata.xml; maybe just because the file
format allows for it and it appeared easy to generate the section when writing
the file. For the Fedora LO RPMs, none of the existing appdata.xml files
contained such a section, and generating one for the Fedora Flatpak case would
require obtaining values for those LIBO_VERSION_* variables, so I just added a
switch to solenv/bin/assemble-flatpak-appdata-step1.sh allowing not to write
that section at all. Splitting solenv/bin/assemble-flatpak-appdata.sh in two
steps is necessary because the Fedora Flatpak case wants to replace the
screenshots in the first part of the generated
org.libreoffice.LibreOffice.appdata.xml, but not in the appended original
appdata.xml files, so needs to hook in between those two steps.)
Change-Id: Ic527f3d88ccbee85e86dad3569b8e73776adf273
---
solenv/bin/assemble-flatpak-appdata-step1.sh | 96 +++++++++++++++++
solenv/bin/assemble-flatpak-appdata-step2.sh | 26 +++++
solenv/bin/assemble-flatpak-desktop.sh | 42 ++++++++
solenv/bin/assemble-flatpak.sh | 102 +------------------
4 files changed, 169 insertions(+), 97 deletions(-)
create mode 100755 solenv/bin/assemble-flatpak-appdata-step1.sh
create mode 100755 solenv/bin/assemble-flatpak-appdata-step2.sh
create mode 100755 solenv/bin/assemble-flatpak-desktop.sh
diff --git a/solenv/bin/assemble-flatpak-appdata-step1.sh b/solenv/bin/assemble-flatpak-appdata-step1.sh
new file mode 100755
index 000000000000..4658dd45d018
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-appdata-step1.sh
@@ -0,0 +1,96 @@
+#! /bin/bash
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory into which to put the target
+# org.libreoffice.LibreOffice.appdata.xml file
+# $2 "1" if a <releases> section shall be included in the target
+# org.libreoffice.LibreOffice.appdata.xml file, "0" if not
+
+set -e
+
+## 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):
+cat <<\EOF >"${1?}"org.libreoffice.LibreOffice.appdata.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>org.libreoffice.LibreOffice.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>MPL-2.0</project_license>
+ <name>LibreOffice</name>
+ <summary>The LibreOffice productivity suite</summary>
+ <description>
+ <p>LibreOffice is a powerful office suite. Its clean interface and
+ feature-rich tools help you unleash your creativity and enhance your
+ productivity. LibreOffice includes several applications that make it the most
+ powerful Free and Open Source office suite on the market: Writer (word
+ processing), Calc (spreadsheets), Impress (presentations), Draw (vector
+ graphics and flowcharts), Base (databases), and Math (formula editing).</p>
+ <p>LibreOffice supports opening and saving into a wide variety of formats, so
+ you can easily share documents with users of other popular office suites
+ without worrying about compatibility.</p>
+ </description>
+ <url type="homepage">http://www.libreoffice.org/discover/libreoffice/</url>
+ <url type="bugtracker">https://bugs.documentfoundation.org/</url>
+ <url type="donation">https://donate.libreoffice.org/</url>
+ <url type="faq">https://wiki.documentfoundation.org/Faq</url>
+ <url type="help">http://www.libreoffice.org/get-help/documentation/</url>
+ <url type="translate">https://wiki.documentfoundation.org/Translating_LibreOffice</url>
+ <screenshots>
+ <screenshot type="default">
+ <image>https://hub.libreoffice.org/screenshots/writer-01.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/calc-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/impress-01.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/draw-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/base-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ </screenshots>
+ <developer_name>The Document Foundation</developer_name>
+ <update_contact>libreoffice_at_lists.freedesktop.org</update_contact>
+ <kudos>
+ <kudo>HiDpiIcon</kudo>
+ <kudo>HighContrast</kudo>
+ <kudo>ModernToolkit</kudo>
+ <kudo>UserDocs</kudo>
+ </kudos>
+ <content_rating type="oars-1.0"/>
+EOF
+
+if [ "${2?}" = 1 ]
+then
+ cat <<EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
+ <releases>
+ <release
+ version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
+ date="$(date +%Y-%m-%d)"/>
+ </releases>
+EOF
+fi
+
+cat <<\EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
+</component>
+EOF
diff --git a/solenv/bin/assemble-flatpak-appdata-step2.sh b/solenv/bin/assemble-flatpak-appdata-step2.sh
new file mode 100755
index 000000000000..4f06e6b19148
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-appdata-step2.sh
@@ -0,0 +1,26 @@
+#! /bin/bash
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory containing the source libreoffice-*.appdata.xml
+# files
+# $2 pathname, ending in a slash, of the directory containing the target
+# org.libreoffice.LibreOffice.appdata.xml file
+
+set -e
+
+# append the appdata for the different components
+for i in "${1?}"libreoffice-*.appdata.xml
+do
+ sed "1 d; s/<id>libreoffice-/<id>org.libreoffice.LibreOffice./" "$i" \
+ >>"${2?}"org.libreoffice.LibreOffice.appdata.xml
+done
diff --git a/solenv/bin/assemble-flatpak-desktop.sh b/solenv/bin/assemble-flatpak-desktop.sh
new file mode 100755
index 000000000000..6d06de4fbbbe
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-desktop.sh
@@ -0,0 +1,42 @@
+#! /bin/bash
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory containing the source libreoffice-*.desktop
+# files
+# $2 pathname, ending in a slash, of the directory into which to put the target
+# org.libreoffice.LibreOffice.*.desktop files
+
+set -e
+
+## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
+for i in "${1?}"libreoffice-*.desktop
+do
+ sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
+ >"${2?}"org.libreoffice.LibreOffice."${i#"${1?}"libreoffice-}"
+done
+mv "${2?}"org.libreoffice.LibreOffice.startcenter.desktop "${2?}"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;//" "${2?}"org.libreoffice.LibreOffice.writer.desktop
+
+desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-startcenter \
+ --set-key=X-Flatpak-RenamedFrom --set-value='libreoffice-startcenter.desktop;' \
+ "${2?}"org.libreoffice.LibreOffice.desktop
+for i in base calc draw impress math writer xsltfilter
+do
+ desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-"$i" \
+ --set-key=X-Flatpak-RenamedFrom \
+ --set-value="libreoffice-$i.desktop;org.libreoffice.LibreOffice-$i.desktop;" \
+ "${2?}"org.libreoffice.LibreOffice."$i".desktop
+done
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index 0738fcd59ad2..8ca5bcf08c41 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -16,30 +16,9 @@ set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
ln -s /app/libreoffice/program/soffice /app/bin/libreoffice
-## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
mkdir -p /app/share/applications
-for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
-do
- sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
- >/app/share/applications/org.libreoffice.LibreOffice."${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
-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
-
-desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-startcenter \
- --set-key=X-Flatpak-RenamedFrom --set-value='libreoffice-startcenter.desktop;' \
- /app/share/applications/org.libreoffice.LibreOffice.desktop
-for i in base calc draw impress math writer xsltfilter
-do
- desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-"$i" \
- --set-key=X-Flatpak-RenamedFrom \
- --set-value="libreoffice-$i.desktop;org.libreoffice.LibreOffice-$i.desktop;" \
- /app/share/applications/org.libreoffice.LibreOffice."$i".desktop
-done
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-desktop.sh "${PREFIXDIR?}"/share/applications/ \
+ /app/share/applications/
## icons/hicolor/*/apps/libreoffice-* ->
## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*:
@@ -82,81 +61,10 @@ do
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 -p /app/share/appdata
-cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
-<?xml version="1.0" encoding="UTF-8"?>
-<component type="desktop">
- <id>org.libreoffice.LibreOffice.desktop</id>
- <metadata_license>CC0-1.0</metadata_license>
- <project_license>MPL-2.0</project_license>
- <name>LibreOffice</name>
- <summary>The LibreOffice productivity suite</summary>
- <description>
- <p>LibreOffice is a powerful office suite. Its clean interface and
- feature-rich tools help you unleash your creativity and enhance your
- productivity. LibreOffice includes several applications that make it the most
- powerful Free and Open Source office suite on the market: Writer (word
- processing), Calc (spreadsheets), Impress (presentations), Draw (vector
- graphics and flowcharts), Base (databases), and Math (formula editing).</p>
- <p>LibreOffice supports opening and saving into a wide variety of formats, so
- you can easily share documents with users of other popular office suites
- without worrying about compatibility.</p>
- </description>
- <url type="homepage">http://www.libreoffice.org/discover/libreoffice/</url>
- <url type="bugtracker">https://bugs.documentfoundation.org/</url>
- <url type="donation">https://donate.libreoffice.org/</url>
- <url type="faq">https://wiki.documentfoundation.org/Faq</url>
- <url type="help">http://www.libreoffice.org/get-help/documentation/</url>
- <url type="translate">https://wiki.documentfoundation.org/Translating_LibreOffice</url>
- <screenshots>
- <screenshot type="default">
- <image>https://hub.libreoffice.org/screenshots/writer-01.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/calc-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/impress-01.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/draw-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/base-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- </screenshots>
- <developer_name>The Document Foundation</developer_name>
- <update_contact>libreoffice_at_lists.freedesktop.org</update_contact>
- <kudos>
- <kudo>HiDpiIcon</kudo>
- <kudo>HighContrast</kudo>
- <kudo>ModernToolkit</kudo>
- <kudo>UserDocs</kudo>
- </kudos>
- <content_rating type="oars-1.0"/>
- <releases>
- <release
- version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
- date="$(date +%Y-%m-%d)"/>
- </releases>
-</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
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-appdata-step1.sh /app/share/appdata/ 1
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-appdata-step2.sh "${PREFIXDIR?}"/share/appdata/ \
+ /app/share/appdata/
## see <https://github.com/flatpak/flatpak/blob/master/app/
## flatpak-builtins-build-finish.c> for further places where build-finish would
--
2.26.2

@ -245,6 +245,8 @@ Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch
# backported # backported
Patch3: 0001-replace-boost-bimap-in-sdext-pdfimport.patch Patch3: 0001-replace-boost-bimap-in-sdext-pdfimport.patch
Patch4: 0001-fix-detecting-qrcodegen.patch Patch4: 0001-fix-detecting-qrcodegen.patch
Patch5: 0001-Flatpak-Add-app-bin-libreoffice-app-libreoffice-prog.patch
Patch6: 0001-Restructure-solenv-bin-assemble-flatpak.sh.patch
%if 0%{?rhel} %if 0%{?rhel}
# not upstreamed # not upstreamed
@ -1322,6 +1324,13 @@ for app in base calc draw impress math startcenter writer xsltfilter; do
install -m 0644 -p $app.desktop %{buildroot}%{_datadir}/applications/libreoffice-$app.desktop install -m 0644 -p $app.desktop %{buildroot}%{_datadir}/applications/libreoffice-$app.desktop
done done
popd popd
%if 0%{?flatpak}
# Transform the libreoffice-*.desktop files into
# org.libreoffice.LibreOffice.*.desktop ones:
solenv/bin/assemble-flatpak-desktop.sh %{buildroot}%{_datadir}/applications/ \
%{buildroot}%{_datadir}/applications/
rm %{buildroot}%{_datadir}/applications/libreoffice-*.desktop
%endif
pushd $WORKDIR/os-integration pushd $WORKDIR/os-integration
#get rid of the gnome icons and other unneeded files #get rid of the gnome icons and other unneeded files
@ -1393,6 +1402,19 @@ install -m 0644 -p %{SOURCE46} %{buildroot}%{_datadir}/icons/hicolor/symbolic/ap
install -m 0644 -p %{SOURCE47} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps install -m 0644 -p %{SOURCE47} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps
install -m 0644 -p %{SOURCE48} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps install -m 0644 -p %{SOURCE48} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps
%if 0%{?flatpak}
# Duplicate icons/*/*/apps/libreoffice-* as
# icons/*/*/apps/org.libreoffice.LibreOffice.* (so they end up "with both their
# original libreoffice-* name as well as the org.libreoffice name needed by
# Flatpak, which fixes the window icons", see <https://github.com/flathub/
# org.libreoffice.LibreOffice/commit/945f6caad87658b1df1e8918bd5f64939058ab7f>
# "clean up desktop integration"):
for i in %{buildroot}%{_datadir}/icons/*/*/apps/libreoffice-*; do
cp -a "$i" \
"$(dirname "$i")"/org.libreoffice.LibreOffice."${i##*/apps/libreoffice-}"
done
%endif
# install man pages # install man pages
install -m 0755 -d %{buildroot}%{_mandir}/man1 install -m 0755 -d %{buildroot}%{_mandir}/man1
install -m 0644 -p sysui/desktop/man/*.1 %{buildroot}%{_mandir}/man1 install -m 0644 -p sysui/desktop/man/*.1 %{buildroot}%{_mandir}/man1
@ -1421,6 +1443,24 @@ appstream-util replace-screenshots %{buildroot}%{_datadir}/metainfo/libreoffice-
appstream-util replace-screenshots %{buildroot}%{_datadir}/metainfo/libreoffice-impress.appdata.xml \ appstream-util replace-screenshots %{buildroot}%{_datadir}/metainfo/libreoffice-impress.appdata.xml \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-impress/a.png https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-impress/a.png
%endif %endif
%if 0%{?flatpak}
# Assemble the libreoffice-*.appdata.xml files into a single
# org.libreoffice.LibreOffice.appdata.xml; first create the single file:
solenv/bin/assemble-flatpak-appdata-step1.sh \
%{buildroot}%{_datadir}/metainfo/ 0
# ...then update the screenshots in the single file (see above):
appstream-util replace-screenshots \
%{buildroot}%{_datadir}/metainfo/org.libreoffice.LibreOffice.appdata.xml \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-writer/a.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-writer/b.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-calc/a.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-draw/a.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/libreoffice-impress/a.png
# ...then append the original files to the single file:
solenv/bin/assemble-flatpak-appdata-step2.sh \
%{buildroot}%{_datadir}/metainfo/ %{buildroot}%{_datadir}/metainfo/
rm %{buildroot}%{_datadir}/metainfo/libreoffice-*.appdata.xml
%endif
# rhbz#1247399 - move stable API jars to noarch java location # rhbz#1247399 - move stable API jars to noarch java location
install -m 0755 -d %{buildroot}%{_javadir}/%{name} install -m 0755 -d %{buildroot}%{_javadir}/%{name}
@ -1753,7 +1793,12 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{baseinstdir}/share/filter/vml-shape-types %{baseinstdir}/share/filter/vml-shape-types
%{baseinstdir}/share/xdg/ %{baseinstdir}/share/xdg/
%{baseinstdir}/program/redirectrc %{baseinstdir}/program/redirectrc
%if 0%{?flatpak}
%{_datadir}/metainfo/org.libreoffice.LibreOffice.appdata.xml
%{_datadir}/applications/org.libreoffice.LibreOffice.desktop
%else
%{_datadir}/applications/libreoffice-startcenter.desktop %{_datadir}/applications/libreoffice-startcenter.desktop
%endif
#launchers #launchers
%{_bindir}/libreoffice %{_bindir}/libreoffice
%{_bindir}/openoffice.org %{_bindir}/openoffice.org
@ -1785,8 +1830,12 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{baseinstdir}/share/registry/base.xcd %{baseinstdir}/share/registry/base.xcd
%{baseinstdir}/share/registry/reportbuilder.xcd %{baseinstdir}/share/registry/reportbuilder.xcd
%{baseinstdir}/program/sbase %{baseinstdir}/program/sbase
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.base.desktop
%else
%{_datadir}/metainfo/libreoffice-base.appdata.xml %{_datadir}/metainfo/libreoffice-base.appdata.xml
%{_datadir}/applications/libreoffice-base.desktop %{_datadir}/applications/libreoffice-base.desktop
%endif
%{_bindir}/oobase %{_bindir}/oobase
%{_mandir}/man1/oobase.1* %{_mandir}/man1/oobase.1*
@ -1881,16 +1930,24 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{baseinstdir}/share/registry/calc.xcd %{baseinstdir}/share/registry/calc.xcd
%{baseinstdir}/program/pagein-calc %{baseinstdir}/program/pagein-calc
%{baseinstdir}/program/scalc %{baseinstdir}/program/scalc
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.calc.desktop
%else
%{_datadir}/metainfo/libreoffice-calc.appdata.xml %{_datadir}/metainfo/libreoffice-calc.appdata.xml
%{_datadir}/applications/libreoffice-calc.desktop %{_datadir}/applications/libreoffice-calc.desktop
%endif
%{_bindir}/oocalc %{_bindir}/oocalc
%{_mandir}/man1/oocalc.1* %{_mandir}/man1/oocalc.1*
%files draw %files draw
%{baseinstdir}/program/pagein-draw %{baseinstdir}/program/pagein-draw
%{baseinstdir}/program/sdraw %{baseinstdir}/program/sdraw
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.draw.desktop
%else
%{_datadir}/metainfo/libreoffice-draw.appdata.xml %{_datadir}/metainfo/libreoffice-draw.appdata.xml
%{_datadir}/applications/libreoffice-draw.desktop %{_datadir}/applications/libreoffice-draw.desktop
%endif
%{_bindir}/oodraw %{_bindir}/oodraw
%{_mandir}/man1/oodraw.1* %{_mandir}/man1/oodraw.1*
@ -1914,8 +1971,12 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{baseinstdir}/share/registry/writer.xcd %{baseinstdir}/share/registry/writer.xcd
%{baseinstdir}/program/pagein-writer %{baseinstdir}/program/pagein-writer
%{baseinstdir}/program/swriter %{baseinstdir}/program/swriter
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.writer.desktop
%else
%{_datadir}/metainfo/libreoffice-writer.appdata.xml %{_datadir}/metainfo/libreoffice-writer.appdata.xml
%{_datadir}/applications/libreoffice-writer.desktop %{_datadir}/applications/libreoffice-writer.desktop
%endif
%{_bindir}/oowriter %{_bindir}/oowriter
%{_mandir}/man1/oowriter.1* %{_mandir}/man1/oowriter.1*
@ -1934,14 +1995,22 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%{baseinstdir}/share/registry/impress.xcd %{baseinstdir}/share/registry/impress.xcd
%{baseinstdir}/program/pagein-impress %{baseinstdir}/program/pagein-impress
%{baseinstdir}/program/simpress %{baseinstdir}/program/simpress
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.impress.desktop
%else
%{_datadir}/metainfo/libreoffice-impress.appdata.xml %{_datadir}/metainfo/libreoffice-impress.appdata.xml
%{_datadir}/applications/libreoffice-impress.desktop %{_datadir}/applications/libreoffice-impress.desktop
%endif
%{_bindir}/ooimpress %{_bindir}/ooimpress
%{_mandir}/man1/ooimpress.1* %{_mandir}/man1/ooimpress.1*
%files math %files math
%{baseinstdir}/program/smath %{baseinstdir}/program/smath
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.math.desktop
%else
%{_datadir}/applications/libreoffice-math.desktop %{_datadir}/applications/libreoffice-math.desktop
%endif
%{_bindir}/oomath %{_bindir}/oomath
%{_mandir}/man1/oomath.1* %{_mandir}/man1/oomath.1*
@ -1958,7 +2027,11 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%files xsltfilter %files xsltfilter
%{baseinstdir}/share/xslt %{baseinstdir}/share/xslt
%{baseinstdir}/share/registry/xsltfilter.xcd %{baseinstdir}/share/registry/xsltfilter.xcd
%if 0%{?flatpak}
%{_datadir}/applications/org.libreoffice.LibreOffice.xsltfilter.desktop
%else
%{_datadir}/applications/libreoffice-xsltfilter.desktop %{_datadir}/applications/libreoffice-xsltfilter.desktop
%endif
%files postgresql %files postgresql
%if 0%{?fedora} %if 0%{?fedora}
@ -2081,6 +2154,10 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
%files data %files data
%{_datadir}/icons/hicolor/*/*/libreoffice* %{_datadir}/icons/hicolor/*/*/libreoffice*
%{_datadir}/icons/locolor/*/*/libreoffice* %{_datadir}/icons/locolor/*/*/libreoffice*
%if 0%{?flatpak}
%{_datadir}/icons/hicolor/*/*/org.libreoffice.LibreOffice.*
%{_datadir}/icons/locolor/*/*/org.libreoffice.LibreOffice.*
%endif
%{_datadir}/mime-info/libreoffice.* %{_datadir}/mime-info/libreoffice.*
%{_datadir}/mime/packages/libreoffice.xml %{_datadir}/mime/packages/libreoffice.xml
# TODO: rename -data to -core-common? # TODO: rename -data to -core-common?

Loading…
Cancel
Save