[screenruler] Add appdata file to show this application in gnome-software

Parag Nemade pnemade at fedoraproject.org
Mon Feb 16 09:23:32 UTC 2015


commit 3ed8ecd9968d2fd2ab52ce418875e89487532ff8
Author: Parag Nemade <pnemade at redhat.com>
Date:   Mon Feb 16 14:53:20 2015 +0530

    Add appdata file to show this application in gnome-software
    
    - Clean the spec to follow current packaging guidelines

 screenruler.spec |   62 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 33 insertions(+), 29 deletions(-)
---
diff --git a/screenruler.spec b/screenruler.spec
index 18ea7c9..6a1c414 100644
--- a/screenruler.spec
+++ b/screenruler.spec
@@ -1,21 +1,20 @@
-Summary:	GNOME screen ruler
-Name:		screenruler
-Version:	0.96
-Release:	3%{?dist}
-License:	GPLv2+
-Group:		Applications/Engineering
-URL:		https://launchpad.net/screenruler/
-Source0:	http://launchpad.net/screenruler/trunk/0.9.6/+download/%{name}-0.9.6.tar.gz
-Source1:	screenruler.desktop
-Patch0:		screenruler-ruby19.patch
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:	desktop-file-utils
-Requires:	ruby
-Requires:	rubygem-gtk2 rubygem-cairo rubygem-gettext
-Obsoletes:	gruler < 0.85
-Provides:	gruler = %{version}-%{release}
-
-BuildArch:	noarch
+Name:          screenruler
+Version:       0.96
+Release:       4%{?dist}
+Summary:       GNOME screen ruler
+License:       GPLv2+
+URL:           https://launchpad.net/screenruler/
+Source0:       http://launchpad.net/screenruler/trunk/0.9.6/+download/%{name}-0.9.6.tar.gz
+Source1:       %{name}.desktop
+Source2:       %{name}.appdata.xml
+Patch0:        screenruler-ruby19.patch
+BuildRequires: desktop-file-utils
+Requires:      ruby
+Requires:      rubygem-gtk2 rubygem-cairo rubygem-gettext
+Obsoletes:     gruler < 0.85
+Provides:      gruler = %{version}-%{release}
+
+BuildArch: noarch
 
 %description
 Screenruler is a small GNOME based utility that allows you to measure objects 
@@ -30,8 +29,6 @@ and as a percentage of the ruler’s length.
 %build
 
 %install
-rm -rf %{buildroot}
-
 mkdir -p %{buildroot}
 
 cat << EOF > screenruler
@@ -40,6 +37,7 @@ cat << EOF > screenruler
 cd %{_datadir}/%{name}
 ruby ./screenruler.rb
 EOF
+
 chmod 0755 screenruler
 
 mkdir -p %{buildroot}%{_bindir}
@@ -50,27 +48,33 @@ cp -p screenruler %{buildroot}%{_bindir}/
 cp -p screenruler-icon*.png %{buildroot}%{_datadir}/pixmaps/
 cp -pr utils *.rb screenruler*.* *.glade %{buildroot}%{_datadir}/%{name}/
 cd %{buildroot}%{_datadir}/pixmaps
- ln -s ./screenruler-icon-32x32.png screenruler-icon.png
+ln -s ./screenruler-icon-32x32.png screenruler-icon.png
 
 desktop-file-install \
 %if 0%{?fedora} && 0%{?fedora} < 19
-	--vendor="fedora"				\
+ --vendor="fedora"    \
 %endif
-	--dir=${RPM_BUILD_ROOT}%{_datadir}/applications		\
-	%{SOURCE1}
+ --dir=%{buildroot}%{_datadir}/applications  \
+ %{SOURCE1}
 
-%clean
-rm -rf %{buildroot}
+# Add AppStream metadata
+install -Dm 0644 -p %{SOURCE2} \
+        %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
 
 %files
-%defattr(-, root, root, -)
-%doc AUTHORS COPYING 
+%doc AUTHORS
+%license COPYING
 %{_bindir}/screenruler
 %{_datadir}/screenruler/
 %{_datadir}/pixmaps/screenruler-icon*.png
 %{_datadir}/applications/*.desktop
+%{_datadir}/appdata/%{name}.appdata.xml
 
 %changelog
+* Mon Feb 16 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.96-4
+- Add appdata file to show this application in gnome-software
+- Clean the spec to follow current packaging guidelines
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.96-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -93,7 +97,7 @@ rm -rf %{buildroot}
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.90-0.2.bzr27
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
-* Wed Mar 20 2011 Deji Akingunola <dakingun at gmail.com> - 0.90-0.1
+* Sun Mar 20 2011 Deji Akingunola <dakingun at gmail.com> - 0.90-0.1
 - Update to 0.9 bzr snapshot
 
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>


More information about the scm-commits mailing list