1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00

Add an AppStream-conforming metadata file

This commit is contained in:
John Zaitseff 2021-01-14 09:11:08 +11:00
parent 6ee2a6a8f1
commit 5130719028
10 changed files with 98 additions and 3 deletions

2
.gitattributes vendored
View File

@ -1,7 +1,9 @@
Makefile.am ident
/configure.ac ident
/build-aux/bootstrap ident
/build-aux/msgfmt-appdata ident
/build-aux/msgfmt-desktop ident
/data/trader.appdata.xml.in ident
/data/trader.desktop.in ident
/data/trader.svg ident
/doc/trader.* ident

1
.gitignore vendored
View File

@ -16,6 +16,7 @@ TAGS
/configure
/stamp-h1
/data/trader.appdata.xml
/data/trader.desktop
/po/POTFILES

View File

@ -33,6 +33,7 @@ SUBDIRS = lib src po data doc m4
# Additional files to distribute
EXTRA_DIST = \
build-aux/bootstrap \
build-aux/msgfmt-appdata \
build-aux/msgfmt-desktop \
lib/obsolete-strings.c \
lib/xopen-source.h

4
NEWS
View File

@ -25,7 +25,9 @@ __ https://www.zap.org.au/
Version 7.16 (not yet released)
-------------------------------
(No changes yet)
Added an application metadata file that conforms to the AppStream 0.12
specification. Updated all translations to suit, using parts of existing
strings.
Version 7.15 (12th January, 2021)

23
build-aux/msgfmt-appdata Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
# Create or update AppData files using msgfmt(1)
# $Id$
# Usage:
# msgfmt-appdata -d PODIR INPUT OUTPUT
set -e
if [ x"$1" != x"-d" ]; then
echo "$0: Missing parameters" 1>&2
exit 1
fi
PODIR="$2"
INPUT="$3"
OUTPUT="$4"
if ! msgfmt --xml -d "$PODIR" --template "$INPUT" -o "$OUTPUT"; then
echo "$0: Using cp(1) program instead"
cp "$INPUT" "$OUTPUT"
fi

View File

@ -82,6 +82,7 @@ AS_IF([test "x$ax_cv_curses_enhanced" = xyes], [],
])
AC_SUBST([desktopdir],['${datadir}/applications'])
AC_SUBST([appdatadir],['${datadir}/metainfo'])
AC_SUBST([iconsdir],['${datadir}/icons/hicolor'])
AC_CONFIG_FILES([

View File

@ -28,6 +28,7 @@
dist_desktop_DATA = trader.desktop
dist_appdata_DATA = trader.appdata.xml
icons16dir = ${iconsdir}/16x16/apps
icons22dir = ${iconsdir}/22x22/apps
@ -55,8 +56,12 @@ dist_iconsscalable_DATA = trader.svg
EXTRA_DIST = \
README \
trader.desktop.in
trader.desktop.in \
trader.appdata.xml.in
trader.desktop: trader.desktop.in
$(top_srcdir)/build-aux/msgfmt-desktop -d $(top_srcdir)/po $< $@
trader.appdata.xml: trader.appdata.xml.in
$(top_srcdir)/build-aux/msgfmt-appdata -d $(top_srcdir)/po $< $@

View File

@ -7,4 +7,4 @@ Star Traders: A Game of Interstellar Trading
============================================
This directory, `data`, contains non-code data related to Star Traders.
In particular, the desktop file and icons are located here.
In particular, the desktop file, AppData file and icons are located here.

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2021, John Zaitseff *
* *
*************************************************************************
Author: John Zaitseff <J.Zaitseff@zap.org.au>
$Id$
This file provides application metadata for Star Traders and conforms to
the AppStream 0.12 specification.
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice and
this notice are preserved. This file is offered as-is, without any
warranty.
-->
<component type="console-application">
<id>au.org.zap.trader</id>
<name>Star Traders</name>
<summary>Play Star Traders, a simple game of interstellar trading</summary>
<description>
<p>
Star Traders is a simple game of interstellar trading, where the
objective is to create companies, buy and sell shares, borrow and
repay money, in order to become the wealthiest player (the winner).
</p>
</description>
<icon>trader.svg</icon>
<launchable type="desktop-id">trader.desktop</launchable>
<provides>
<binary>trader</binary>
</provides>
<categories>
<category>Game</category>
<category>StrategyGame</category>
</categories>
<url type="homepage">https://www.zap.org.au/projects/trader/</url>
<developer_name>John Zaitseff</developer_name>
<screenshots>
<screenshot type="default">
<image>https://www.zap.org.au/projects/trader/screenshot.png</image>
</screenshot>
</screenshots>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-3.0+</project_license>
<content_rating type="oars-1.0" />
</component>

View File

@ -28,6 +28,7 @@
# Data files from Star Traders
data/trader.desktop.in
data/trader.appdata.xml.in
# Source files from Star Traders
src/trader.c