rhughes pushed to openttd (master). "Add an AppData file for the software center"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Mar 26 16:54:17 UTC 2015
>From fad6406139c3b38b6e1c20690f1b07400b4b4b42 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard at hughsie.com>
Date: Thu, 26 Mar 2015 16:40:24 +0000
Subject: Add an AppData file for the software center
diff --git a/openttd.spec b/openttd.spec
index 3af03ae..0296169 100644
--- a/openttd.spec
+++ b/openttd.spec
@@ -3,7 +3,7 @@
Name: openttd
Version: 1.4.4
-Release: 2%{?prever}%{?dist}
+Release: 3%{?prever}%{?dist}
Summary: Transport system simulation game
Group: Amusements/Games
@@ -78,6 +78,45 @@ desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
--add-category=StrategyGame \
media/openttd.desktop
+# Register as an application to be visible in the software center
+#
+# NOTE: It would be *awesome* if this file was maintained by the upstream
+# project, translated and installed into the right place during `make install`.
+#
+# See http://www.freedesktop.org/software/appstream/docs/ for more details.
+#
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
+cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Ankur Sinha <ankursinha at fedoraproject.org> -->
+<!--
+EmailAddress: alberth at openttd.org
+SentUpstream: 2014-09-25
+-->
+<application>
+ <id type="desktop">openttd.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <summary>A highly detailed transport simulation game</summary>
+ <description>
+ <p>
+ OpenTTD is a transport tycoon simulation game that enhances the
+ original Transport Tycoon game developed by Chris Sawyer.
+ The game includes road, air, train and naval transport with a large
+ selection of industries and passenger services that need to be provided.
+ </p>
+ <p>
+ The game can be played in both single and multiplayer modes where
+ you compete with other transport companies to dominate the markets.
+ </p>
+ </description>
+ <url type="homepage">http://www.openttd.org</url>
+ <screenshots>
+ <screenshot type="default">http://media.openttd.org/images/screens/1.4/02-opengfx-1920x1200.png</screenshot>
+ <screenshot>http://media.openttd.org/images/screens/1.3/realgrowth.png</screenshot>
+ </screenshots>
+ <updatecontact>info at openttd.org</updatecontact>
+</application>
+EOF
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@@ -95,6 +134,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc COPYING changelog.txt known-bugs.txt readme.txt
%{_bindir}/%{name}
+%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man6/%{name}.6*
%{_datadir}/%{name}
@@ -109,6 +149,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Thu Mar 26 2015 Richard Hughes <rhughes at redhat.com> - 1.4.4-3
+- Add an AppData file for the software center
+
* Mon Jan 26 2015 David Tardon <dtardon at redhat.com> - 1.4.4-2
- rebuild for ICU 54.1
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/openttd.git/commit/?h=master&id=fad6406139c3b38b6e1c20690f1b07400b4b4b42
More information about the scm-commits
mailing list