From 8736d54e97d6e8e79c9024986e35c8fe12ee0dde Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Feb 06 2019 15:36:40 +0000 Subject: Validate the appdata file While at this, move the %check section to the canonical location after %install. --- diff --git a/0ad.spec b/0ad.spec index 5b1ef32..0e09962 100644 --- a/0ad.spec +++ b/0ad.spec @@ -96,6 +96,7 @@ BuildRequires: SDL2-devel BuildRequires: subversion BuildRequires: valgrind-devel BuildRequires: wxGTK3-devel +BuildRequires: /usr/bin/appstream-util BuildRequires: /usr/bin/python ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 @@ -160,15 +161,6 @@ build/workspaces/update-workspaces.sh \ make %{?_smp_mflags} -C build/workspaces/gcc config=%{config} verbose=1 #----------------------------------------------------------------------- -# Depends on availablity of nvtt -%ifnarch aarch64 -%if %{with nvtt} -%check -LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system -%endif -%endif - -#----------------------------------------------------------------------- %install install -d -m 755 %{buildroot}%{_bindir} install -p -m 755 build/resources/0ad.sh %{buildroot}%{_bindir}/0ad @@ -201,13 +193,23 @@ install -d -m 755 %{buildroot}%{_mandir}/man6 install -p -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man6/%{name}.6 ln -sf %{name}.6 %{buildroot}%{_mandir}/man6/pyrogenesis.6 -desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop - %if %{with debug} export STRIP=/bin/true %endif #----------------------------------------------------------------------- +%check +# Depends on availablity of nvtt +%ifnarch aarch64 +%if %{with nvtt} +LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system +%endif +%endif + +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/0ad.appdata.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop + +#----------------------------------------------------------------------- %files %doc README.txt %license LICENSE.txt @@ -226,6 +228,7 @@ export STRIP=/bin/true - Correctly set RPATH for private libraries - Install the icon to the hicolor icon theme - Move the appdata file to metainfo directory +- Validate the appdata file * Thu Jan 31 2019 Fedora Release Engineering - 0.0.23b-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild