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

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 16:22:09 UTC 2015


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


diff --git a/dia.spec b/dia.spec
index 922821d..bf0d7b0 100644
--- a/dia.spec
+++ b/dia.spec
@@ -1,6 +1,6 @@
 Name:           dia
 Version:        0.97.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Epoch:          1
 Summary:        Diagram drawing program
 License:        GPLv2+
@@ -67,6 +67,50 @@ desktop-file-install --delete-original \
 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
 
+# 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> -->
+<!--
+BugReportURL: https://bugzilla.gnome.org/show_bug.cgi?id=710955
+SentUpstream: 2013-10-27
+-->
+<application>
+  <id type="desktop">dia.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <summary>Dia is a GTK+ based diagram creation program</summary>
+  <description>
+    <p>
+      Dia is roughly inspired by the commercial Windows program 'Visio,' though
+      more geared towards informal diagrams for casual use.
+      It can be used to draw many different kinds of diagrams.
+      It currently has special objects to help draw entity relationship diagrams,
+      UML diagrams, flowcharts, network diagrams, and many other diagrams.
+      It is also possible to add support for new shapes by writing simple XML files,
+      using a subset of SVG to draw the shape.
+    </p>
+    <p>
+      It can load and save diagrams to a custom XML format (gzipped by default,
+      to save space), can export diagrams to a number of formats, including EPS,
+      SVG, XFIG, WMF and PNG, and can print diagrams (including ones that span
+      multiple pages).
+    </p>
+  </description>
+  <url type="homepage">https://wiki.gnome.org/Apps/Dia</url>
+  <screenshots>
+    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/dia/a.png</screenshot>
+  </screenshots>
+  <updatecontact>dia-list at gnome.org</updatecontact>
+</application>
+EOF
+
 %post
 touch --no-create %{_datadir}/icons/hicolor || :
 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
@@ -90,6 +134,7 @@ fi
 %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
 %{_datadir}/applications/fedora-%{name}.desktop
 %else
+%{_datadir}/appdata/%{name}.appdata.xml
 %{_datadir}/applications/%{name}.desktop
 %endif
 %dir %{_libdir}/%{name}
@@ -97,6 +142,9 @@ fi
 %{_datadir}/icons/hicolor/*/apps/*
 
 %changelog
+* Thu Mar 26 2015 Richard Hughes <rhughes at redhat.com> - 1:0.97.3-2
+- Add an AppData file for the software center
+
 * Mon Sep 08 2014 Jiri Popelka <jpopelka at redhat.com> - 1:0.97.3-1
 - 0.97.3
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/dia.git/commit/?h=master&id=3ef13c6308be71400aaf115f6631ef048f305674


More information about the scm-commits mailing list