rhughes pushed to mj (master). "Add an AppData file for the software center"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 16:51:31 UTC 2015


>From a463ac09e3717e1e53e00f4e264ec3df6e4c2a39 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard at hughsie.com>
Date: Thu, 26 Mar 2015 16:38:31 +0000
Subject: Add an AppData file for the software center


diff --git a/mj.spec b/mj.spec
index 0e77d34..4740ad5 100644
--- a/mj.spec
+++ b/mj.spec
@@ -1,6 +1,6 @@
 Name:        mj
 Version:     1.14
-Release:     2
+Release:     3
 Summary:     Mah-Jong program with network option
 Summary(sv): Mah-Jong-program med nätmöjlighet
 
@@ -107,6 +107,37 @@ desktop-file-install --dir=%buildroot%desktopdir %name.desktop
 mkdir -p %buildroot%icondir
 convert icon.ico %buildroot%icondir/%name.png
 
+# 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 Your Name <email at address.com> -->
+<!--
+EmailAddress: mahjong at stevens-bradfield.com
+SentUpstream: 2014-09-24
+-->
+<application>
+  <id type="desktop">mj.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <summary>Mahjong game platforms with network capability </summary>
+  <description>
+    <p>
+      Game platforms with network capability game can be played by four humans,
+      by a human vs three computer players, or any other combination.
+    </p>
+  </description>
+  <url type="homepage">http://mahjong.julianbradfield.org/</url>
+  <screenshots>
+    <screenshot type="default">http://mahjong.julianbradfield.org/screenshots/11.gif</screenshot>
+  </screenshots>
+</application>
+EOF
 
 %post
 touch --no-create %icontop &>/dev/null || :
@@ -125,11 +156,15 @@ gtk-update-icon-cache %icontop &>/dev/null || :
 %doc ChangeLog CHANGES LICENCE README rules.txt use.txt
 %_bindir/*
 %_mandir/man1/*
+%{_datadir}/appdata/*.appdata.xml
 %desktopdir/%name.desktop
 %icondir/%name.png
 
 
 %changelog
+* Thu Mar 26 2015 Richard Hughes <rhughes at redhat.com> - 1.14-3
+- Add an AppData file for the software center
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.14-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mj.git/commit/?h=master&id=a463ac09e3717e1e53e00f4e264ec3df6e4c2a39


More information about the scm-commits mailing list