Name: qjoypad Version: 4.1.0 Release: 2%{?dist} Summary: Gamepad translator software Group: Amusements/Games License: GPLv2 URL: http://qjoypad.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: %{name}.desktop BuildRequires: qt-devel BuildRequires: libXtst-devel BuildRequires: desktop-file-utils %description QJoyPad takes input from a gamepad or joystick and translates it into key strokes or mouse actions, letting you control any XWindows program with your game controller. This lets you play all those games that for some reason don't have joystick support with your joystick. %prep %setup -q iconv -f iso8859-1 -t utf-8 README.txt > README cp LICENSE{.txt,} sed -i -e 's,qmake,qmake-qt4,g' src/config sed -i -r -e 's,^QMAKE_LIBS (.*),QMAKE_LIBS \1 -lX11,' src/qjoypad.pro %build cd src ./config --prefix=%{_prefix} make %{?_smp_mflags} %install cd src # why cannot everyone just use GNU Autotools.. # use of $RPM_BUILD_ROOT outside %%install is prohibited and the provided # script too braindead to create the directory itself ./config --prefix=%{_prefix} --install-dir=$RPM_BUILD_ROOT make install # die die die! rm -rf $RPM_BUILD_ROOT%{_defaultdocdir} desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE1} # link default icon ln -s %{_datadir}/pixmaps/qjoypad/gamepad4-64x64.png \ ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/qjoypad.png %files %defattr(-,root,root,-) %doc README LICENSE %{_bindir}/* %{_datadir}/applications/* %{_datadir}/pixmaps/%{name} %{_datadir}/pixmaps/%{name}.png %changelog * Thu Nov 4 2010 Alexander Kahl - 4.1.0-2 - eliminated %%clean altogether - split up into two config calls in order to prevent breaking the guidelines regarding use of $RPM_BUILD_ROOT * Thu Nov 4 2010 Alexander Kahl - 4.1.0-1 - update to 4.1.0 - added symbolic link for suitable default icon * Thu Nov 4 2010 Alexander Kahl - 4.0.0-2 - updated spec to latest standards - replace occurences of my former corporate email address - added libX11 to linker list * Sat Oct 17 2009 Alexander Kahl - 4.0.0-1 - initial creation