[gnome-calculator] Validate AppData in check

David King amigadave at fedoraproject.org
Fri Jan 23 10:49:56 UTC 2015


commit 55a5b771ae1d7ca604b10618682369b28012c901
Author: David King <amigadave at amigadave.com>
Date:   Fri Jan 23 10:33:25 2015 +0000

    Validate AppData in check
    
    https://fedoraproject.org/wiki/Packaging:AppData

 gnome-calculator.spec |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gnome-calculator.spec b/gnome-calculator.spec
index 993325f..050d75d 100644
--- a/gnome-calculator.spec
+++ b/gnome-calculator.spec
@@ -18,6 +18,7 @@ BuildRequires: gettext
 BuildRequires: intltool
 BuildRequires: itstool
 BuildRequires: mpfr-devel
+BuildRequires: /usr/bin/appstream-util
 
 Provides:  gcalctool = 6.6.2-3
 Obsoletes: gcalctool < 6.6.2-3
@@ -39,11 +40,13 @@ make %{?_smp_mflags}
 
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=%{buildroot}
+%find_lang %{name} --with-gnome --all-name
 
-desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/gnome-calculator.desktop
 
-%find_lang %{name} --with-gnome --all-name
+%check
+appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/gnome-calculator.appdata.xml
+desktop-file-validate %{buildroot}/%{_datadir}/applications/gnome-calculator.desktop
 
 
 %postun
@@ -77,6 +80,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 - Update man page globs in files section
 - Use pkgconfig for BuildRequires
 - Remove obsolete glib2 dependencies for GSettings schema
+- Validate AppData in check
 
 * Fri Dec 19 2014 Richard Hughes <rhughes at redhat.com> - 3.15.1-1
 - Update to 3.15.1


More information about the scm-commits mailing list