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

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 16:43:57 UTC 2015


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


diff --git a/groovy.spec b/groovy.spec
index 771cc5b..d2f6dee 100644
--- a/groovy.spec
+++ b/groovy.spec
@@ -4,7 +4,7 @@
 
 Name:           groovy
 Version:        2.4.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Dynamic language for the Java Platform
 
 # Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded
@@ -186,10 +186,46 @@ install -p -m644 subprojects/groovy-console/src/main/resources/groovy/ui/Console
 desktop-file-install --dir %{buildroot}%{_datadir}/applications \
         %{SOURCE3}
 
+# 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 Ryan Lerch <rlerch at redhat.com> -->
+<!--
+SentUpstream: No public bugtracker
+-->
+<application>
+  <id type="desktop">groovy.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <summary>Interactive console for the Groovy programming language</summary>
+  <description>
+    <p>
+      Groovy is a dynamic programming language that is commonly used as a
+      scripting language for the Java platform. This application provides an
+      interactive console for evaluating scripts in the Groovy language.
+    </p>
+  </description>
+  <url type="homepage">http://groovy.codehaus.org/</url>
+  <screenshots>
+    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/groovy/a.png</screenshot>
+  </screenshots>
+  <!-- FIXME: change this to an upstream email address for spec updates
+  <updatecontact>someone_who_cares at upstream_project.org</updatecontact>
+  -->
+</application>
+EOF
+
 %files
 %{_datadir}/%{name}
 %{_bindir}/*
 %{_datadir}/pixmaps/*
+%{_datadir}/appdata/*.appdata.xml
 %{_datadir}/applications/*
 %config(noreplace) %{_sysconfdir}/*
 
@@ -197,6 +233,9 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications \
 %doc LICENSE.txt NOTICE.txt README.adoc
 
 %changelog
+* Thu Mar 26 2015 Richard Hughes <rhughes at redhat.com> - 2.4.1-3
+- Add an AppData file for the software center
+
 * Thu Mar 26 2015 Mikolaj Izdebski <mizdebsk at redhat.com> - 2.4.1-2
 - Remove build dependency on cobertura
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/groovy.git/commit/?h=master&id=78af534e9c4ea6aa85d3573e1c0a67c37290ed18


More information about the scm-commits mailing list