[antimicro] added appdata support
jsbackus
jsbackus at fedoraproject.org
Sat Jan 24 02:43:29 UTC 2015
commit 69f5fc8ebd6931d70ffa2f188735750d322b6128
Author: Jeff Backus <jeff.backus at gmail.com>
Date: Fri Jan 23 21:43:56 2015 -0500
added appdata support
.gitignore | 1 +
antimicro.spec | 22 ++++++++++++++++++++--
sources | 1 +
3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 090749b..fe3b1cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
*.tar*
*.zip
results_*/
+/antimicro-appdata.patch
diff --git a/antimicro.spec b/antimicro.spec
index a6cc811..99b1d8f 100644
--- a/antimicro.spec
+++ b/antimicro.spec
@@ -13,7 +13,7 @@
Name: antimicro
Version: 2.10.1
-Release: 1%{?gitrel}%{?dist}
+Release: 2%{?gitrel}%{?dist}
Summary: Graphical program used to map keyboard buttons and mouse controls to a gamepad
License: GPLv3+
@@ -23,12 +23,18 @@ URL: https://github.com/Ryochan7/%{name}
# Sources for snapshot-builds.
%{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}}
+Patch0: antimicro-appdata.patch
+
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: libX11-devel
BuildRequires: libXtst-devel
BuildRequires: qt-devel
BuildRequires: SDL2-devel
+# For AppData
+BuildRequires: libappstream-glib
+BuildRequires: itstool
+BuildRequires: gettext
%description
AntiMicro is a graphical program used to map keyboard keys and mouse controls
@@ -40,12 +46,13 @@ QJoyPad but has additional features.
%prep
%setup -q%{!?rel_build:n %{name}-%{commit}}
+%patch0 -p1
%build
%{__mkdir} -p build-%{name}-%{_target}
pushd build-%{name}-%{_target}
%cmake -DWITH_UINPUT=ON ..
-%{__make} %{?_smp_mflags}
+%{__make} %{?_smp_mflags} appdata
popd
@@ -57,6 +64,11 @@ popd
# Install and verify desktop file
%{_bindir}/desktop-file-install other/%{name}.desktop
+# Validate AppData file
+%if 0%{fedora} >= 20
+%{_bindir}/appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
+%endif
+
%find_lang %{name} --with-qt
@@ -76,9 +88,15 @@ popd
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
%{_mandir}/man1/%{name}.1*
+%if 0%{fedora} >= 20
+%{_datadir}/appdata/%{name}.appdata.xml
+%endif
%changelog
+* Sat Jan 3 2015 Jeff Backus <jeff.backus at gmail.com> - 2.10.1-2
+- added appdata support
+
* Mon Dec 29 2014 Jeff Backus <jeff.backus at gmail.com> - 2.10.1-1
- new upstream release v2.10.1
diff --git a/sources b/sources
index 538e870..2a911c9 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
78166894386b640ac30659efd6179144 antimicro-2.10.1.tar.gz
+cb614b03ecc5973ddcbadb3dcac6ea44 antimicro-appdata.patch
More information about the scm-commits
mailing list