Skip to content

Commit

Permalink
appdata: Improve appdata for AppStream 1.0
Browse files Browse the repository at this point in the history
- Add the `<developer><name>` tag
- Mark the `<developer_name>` tag as deprecated
- Mark the developer name as untranslatable
- Update the content_rating tag
- Comment out the unreleased version tag for appstreamcli validation
- Integrate appstreamcli for appdata validation
- Use desktop-file-validate to validate desktop file
- Activate meson test to validate appdata on the build process
  • Loading branch information
yakushabb committed Jan 4, 2024
1 parent df0efe6 commit 0840465
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions com.github.cassidyjames.clairvoyant.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{
"name": "clairvoyant",
"buildsystem": "meson",
"run-tests": true,
"sources": [
{
"type": "dir",
Expand Down
22 changes: 20 additions & 2 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install_data(
rename: meson.project_name() + '-symbolic.svg'
)

i18n.merge_file(
desktop_file = i18n.merge_file(
input: 'launcher.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.project_source_root(), 'po'),
Expand All @@ -18,11 +18,29 @@ i18n.merge_file(
install_dir: join_paths(get_option('datadir'), 'applications')
)

i18n.merge_file(
# Validate Desktop
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('validate-desktop', desktop_utils,
args: [desktop_file]
)
endif

metainfo_file = i18n.merge_file(
input: 'metainfo.appdata.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: join_paths(meson.project_source_root(), 'po'),
type: 'xml',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

# Validate Appdata
appstreamcli = find_program('appstreamcli', required: false)
if (appstreamcli.found())
test('validate-appdata',
appstreamcli,
args: ['validate', '--no-net', '--explain', metainfo_file],
workdir: meson.current_build_dir()
)
endif
11 changes: 7 additions & 4 deletions data/metainfo.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

<name>Clairvoyant</name>
<summary>Ask questions, get psychic answers</summary>
<developer_name>Cassidy James Blaede</developer_name>
<developer_name translatable="no">Cassidy James Blaede</developer_name>
<developer id="github.com">
<name translatable="no">Cassidy James Blaede</name>
</developer>
<description>
<p>Does he love you? Should you have pizza for dinner? Is there such thing as a stupid question? Discover the answers to these questions and more with Clairvoyant, the magic 8-ball inspired fortune teller.</p>
<ul>
Expand Down Expand Up @@ -54,15 +57,15 @@
</screenshots>

<releases>
<release version="3.1.3">
<!-- <release version="3.1.3" date="2023-12-28">
<description>
<p>Updated translations</p>
<ul>
<li>Updated Ukrainian translations thanks to Volkov (@Vovkiv on GitHub)</li>
<li>Updated Russian translations thanks to Sergej A. (@Ser82-png on GitHub)</li>
</ul>
</description>
</release>
</release>-->
<release version="3.1.2" date="2023-09-25">
<description>
<p>Deep Purple</p>
Expand Down Expand Up @@ -203,7 +206,7 @@
</release>
</releases>

<content_rating type="oars-1.1"></content_rating>
<content_rating type="oars-1.1" />

<url type="homepage">https://cassidyjames.com</url>
<url type="bugtracker">https://github.com/cassidyjames/clairvoyant/issues</url>
Expand Down

0 comments on commit 0840465

Please sign in to comment.