From a1c0866439b6115ae4cada6b73f25052ddb15fbf Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 26 Mar 2015 16:47:07 +0000 Subject: [PATCH] Add an AppData file for the software center --- xsane.spec | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) 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 < + + + + xsane.desktop + CC0-1.0 + Scan images with a scanner + +

+ 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. +

+
+ http://www.xsane.org/ + + http://www.xsane.org/doc/xsane-save.jpg + +
+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 - 0.999-18 +- Add an AppData file for the software center + * Mon Dec 08 2014 David King - 0.999-17 - Depend on hicolor-icon-theme for icon directories (#1171826)