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

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 17:05:19 UTC 2015


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


diff --git a/xsane.spec b/xsane.spec
index 6c4fcd3..7aeb138 100644
--- a/xsane.spec
+++ b/xsane.spec
@@ -15,7 +15,7 @@
 Name: xsane
 Summary: X Window System front-end for the SANE scanner interface
 Version: 0.999
-Release: 17%{?dist}
+Release: 18%{?dist}
 Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
 Source1: xsane-256x256.png
 # use "xdg-open" instead of "netscape" to launch help browser
@@ -193,6 +193,42 @@ for res in 16 32 48 256; do
     install -m 0644 src/xsane-${res}x${res}.png "${tdir}/xsane.png"
 done
 
+# 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> -->
+<!--
+EmailAddress: Oliver.Rauch at xsane.org
+SentUpstream: 2014-09-17
+-->
+<application>
+  <id type="desktop">xsane.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <summary>Scan images with a scanner</summary>
+  <description>
+    <p>
+      XSane is an application to scan images using a hardware scanner attached
+      to your computer.
+      It is able to save in a variety of image formats, including TIFF and JPEG
+      and can even save your scan as a PDF.
+      XSane also has support for scanning multiple pages and merging them into
+      a single document.
+    </p>
+  </description>
+  <url type="homepage">http://www.xsane.org/</url>
+  <screenshots>
+    <screenshot type="default">http://www.xsane.org/doc/xsane-save.jpg</screenshot>
+  </screenshots>
+</application>
+EOF
+
 %find_lang %{name} XSANE.lang
 
 %clean
@@ -222,8 +258,10 @@ fi
 %{_bindir}/xsane
 %{_mandir}/man1/*
 %if %{with desktop_vendor_tag}
+%{_datadir}/appdata/%{name}.appdata.xml
 %{_datadir}/applications/fedora-xsane.desktop
 %else
+%{_datadir}/appdata/%{name}.appdata.xml
 %{_datadir}/applications/xsane.desktop
 %endif
 %{_datadir}/pixmaps/xsane.xpm
@@ -240,6 +278,9 @@ fi
 %{_datadir}/sane/xsane
 
 %changelog
+* Thu Mar 26 2015 Richard Hughes <rhughes at redhat.com> - 0.999-18
+- Add an AppData file for the software center
+
 * Mon Dec 08 2014 David King <amigadave at amigadave.com> - 0.999-17
 - Depend on hicolor-icon-theme for icon directories (#1171826)
 
-- 
cgit v0.10.2


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


More information about the scm-commits mailing list