Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / solenv / bin / assemble-flatpak-appdata.sh
blob4896cf3f20bc06e86ab9555833dcbbca67de5cfd
1 #! /bin/bash
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
11 # Flatpak from a Fedora libreoffice.spec file.
13 # Arguments:
14 # $1 pathname, ending in a slash, of the directory into which to put the target
15 # org.libreoffice.LibreOffice.appdata.xml file
16 # $2 "1" if a <releases> section shall be included in the target
17 # org.libreoffice.LibreOffice.appdata.xml file, "0" if not
19 set -e
21 ## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various
22 ## inst/share/metainfo/libreoffice-*.appdata.xml (at least recent GNOME Software
23 ## doesn't show more than five screenshots anyway, so restrict to one each from
24 ## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base):
25 cat <<\EOF >"${1?}"org.libreoffice.LibreOffice.appdata.xml
26 <?xml version="1.0" encoding="UTF-8"?>
27 <component type="desktop">
28 <id>org.libreoffice.LibreOffice.desktop</id>
29 <metadata_license>CC0-1.0</metadata_license>
30 <project_license>MPL-2.0</project_license>
31 <name>LibreOffice</name>
32 <summary>The LibreOffice productivity suite</summary>
33 <description>
34 <p>LibreOffice is a powerful office suite. Its clean interface and
35 feature-rich tools help you unleash your creativity and enhance your
36 productivity. LibreOffice includes several applications that make it the most
37 powerful Free and Open Source office suite on the market: Writer (word
38 processing), Calc (spreadsheets), Impress (presentations), Draw (vector
39 graphics and flowcharts), Base (databases), and Math (formula editing).</p>
40 <p>LibreOffice supports opening and saving into a wide variety of formats, so
41 you can easily share documents with users of other popular office suites
42 without worrying about compatibility.</p>
43 </description>
44 <url type="homepage">http://www.libreoffice.org/discover/libreoffice/</url>
45 <url type="bugtracker">https://bugs.documentfoundation.org/</url>
46 <url type="donation">https://donate.libreoffice.org/</url>
47 <url type="faq">https://wiki.documentfoundation.org/Faq</url>
48 <url type="help">http://www.libreoffice.org/get-help/documentation/</url>
49 <url type="translate">https://wiki.documentfoundation.org/Translating_LibreOffice</url>
50 <screenshots>
51 <screenshot type="default">
52 <image>https://hub.libreoffice.org/screenshots/writer-01.png</image>
53 <caption><!-- Describe this screenshot in less than ~10 words --></caption>
54 </screenshot>
55 <screenshot>
56 <image>https://hub.libreoffice.org/screenshots/calc-02.png</image>
57 <caption><!-- Describe this screenshot in less than ~10 words --></caption>
58 </screenshot>
59 <screenshot>
60 <image>https://hub.libreoffice.org/screenshots/impress-01.png</image>
61 <caption><!-- Describe this screenshot in less than ~10 words --></caption>
62 </screenshot>
63 <screenshot>
64 <image>https://hub.libreoffice.org/screenshots/draw-02.png</image>
65 <caption><!-- Describe this screenshot in less than ~10 words --></caption>
66 </screenshot>
67 <screenshot>
68 <image>https://hub.libreoffice.org/screenshots/base-02.png</image>
69 <caption><!-- Describe this screenshot in less than ~10 words --></caption>
70 </screenshot>
71 </screenshots>
72 <developer_name>The Document Foundation</developer_name>
73 <update_contact>libreoffice_at_lists.freedesktop.org</update_contact>
74 <kudos>
75 <kudo>HiDpiIcon</kudo>
76 <kudo>HighContrast</kudo>
77 <kudo>ModernToolkit</kudo>
78 <kudo>UserDocs</kudo>
79 </kudos>
80 <content_rating type="oars-1.0"/>
81 EOF
83 if [ "${2?}" = 1 ]
84 then
85 cat <<EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
86 <releases>
87 <release
88 version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
89 date="$(date +%Y-%m-%d)"/>
90 </releases>
91 EOF
94 cat <<\EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
95 </component>
96 EOF