[simple-scan] Validate AppData and desktop file during check

David King amigadave at fedoraproject.org
Mon Mar 2 07:51:23 UTC 2015


commit 6647067dd158ad495933771221bbf491c00e7af3
Author: David King <amigadave at amigadave.com>
Date:   Mon Mar 2 07:09:54 2015 +0000

    Validate AppData and desktop file during check

 simple-scan-3.15.91-desktop-keywords.patch | 26 ++++++++++++++++++++++++++
 simple-scan.spec                           | 12 ++++++++++++
 2 files changed, 38 insertions(+)
---
diff --git a/simple-scan-3.15.91-desktop-keywords.patch b/simple-scan-3.15.91-desktop-keywords.patch
new file mode 100644
index 0000000..8795f61
--- /dev/null
+++ b/simple-scan-3.15.91-desktop-keywords.patch
@@ -0,0 +1,26 @@
+=== modified file 'po/fr.po'
+--- po/fr.po	2015-02-23 05:16:45 +0000
++++ po/fr.po	2015-03-02 07:29:26 +0000
+@@ -302,7 +302,7 @@
+ 
+ #: ../data/simple-scan.desktop.in.h:4
+ msgid "scan;scanner;flatbed;adf;"
+-msgstr "scanner;numériseur;à plat;adf"
++msgstr "scanner;numériseur;à plat;adf;"
+ 
+ #: ../data/org.gnome.SimpleScan.gschema.xml.in.h:1
+ msgid "Device to scan from"
+
+=== modified file 'po/sv.po'
+--- po/sv.po	2015-02-23 05:16:45 +0000
++++ po/sv.po	2015-03-02 07:29:50 +0000
+@@ -301,7 +301,7 @@
+ 
+ #: ../data/simple-scan.desktop.in.h:4
+ msgid "scan;scanner;flatbed;adf;"
+-msgstr "scan;scanner;flatbädd;adf;skan;skanner"
++msgstr "scan;scanner;flatbädd;adf;skan;skanner;"
+ 
+ #: ../data/org.gnome.SimpleScan.gschema.xml.in.h:1
+ msgid "Device to scan from"
+
diff --git a/simple-scan.spec b/simple-scan.spec
index 03a3391..8d2fdfb 100644
--- a/simple-scan.spec
+++ b/simple-scan.spec
@@ -6,10 +6,14 @@ Summary:        Simple scanning utility
 License:        GPLv3+
 URL:            https://launchpad.net/%{name}
 Source0:        https://launchpad.net/%{name}/3.15/%{version}/+download/%{name}-%{version}.tar.xz
+# https://bugs.launchpad.net/simple-scan/+bug/1427090
+Patch0:         simple-scan-3.15.91-desktop-keywords.patch
 
 BuildRequires:  intltool
 BuildRequires:  sane-backends-devel
 BuildRequires:  itstool
+BuildRequires:  /usr/bin/appstream-util
+BuildRequires:  /usr/bin/desktop-file-validate
 BuildRequires:  /usr/bin/valac
 BuildRequires:  pkgconfig(colord)
 BuildRequires:  pkgconfig(gtk+-3.0)
@@ -25,6 +29,7 @@ scanner and quickly have the image/document in an appropriate format.
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 %configure
@@ -34,6 +39,12 @@ make V=1 %{?_smp_mflags}
 make DESTDIR=%{buildroot} INSTALL="install -p" install
 %find_lang %{name} --with-man --with-gnome
 
+
+%check
+appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
+desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
+
+
 %postun
 if [ $1 -eq 0 ]; then
     glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
@@ -55,6 +66,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %changelog
 * Mon Mar 02 2015 David King <amigadave at amigadave.com> - 3.15.91-1
 - Update to 3.15.91
+- Validate AppData and desktop file during check
 
 * Mon Feb 16 2015 David King <amigadave at amigadave.com> - 3.15.90-1
 - Update to 3.15.90


More information about the scm-commits mailing list