%define _disable_ld_no_undefined 1 %define name cwiid %define oname CWiid %define version 0.6.01 %define pre 0 %define rel 5 %if %pre %define release %mkrel 0.%{pre}.%{rel} %define distname %{name}-%{version}_%{pre} %else %define release %mkrel %{rel} %define distname %{name}-%{version} %endif %define lib_major 1 %define lib_name %mklibname %{name} %{lib_major} %define devel_name %mklibname %{name} -d %define plugins_dir %{_libdir}/%{name}/plugins Summary: %{oname} Wiimote Interface Name: %{name} Version: %{version} Release: %{release} Source0: http://www.abstrakraft.org/%{distname}.tar.xz Source1: cwiid.service Patch0: cwiid-0.6.01-wmdemo-dso.patch Patch1: cwiid-0.6.00-fix-str-fmt.patch License: GPL Group: System/Kernel and hardware Url: http://abstrakraft.org/cwiid/ BuildRequires: bison bluez-devel flex gtk+2-devel python-devel Requires: python-%{name} %description %{oname} is a Wiimote Interface. The %{name} package contains the following parts: 1.%{name} library - abstracts the interface to the wiimote by hiding the details of the underlying Bluetooth connection 2.wmif - provides a simple text-based interface to the wiimote. 3.wmgui - provides a simple GTK gui to the wiimote. %package -n %{lib_name} Summary: %{oname} Wiimote library Group: System/Libraries Conflicts: %mklibname wiimote 0 Obsoletes: %mklibname wiimote 1 %description -n %{lib_name} This package contains the library needed to run programs dynamically linked with the %{oname} Wiimote library. %package -n %{devel_name} Summary: Development headers and libraries for %{oname} Group: Development/C Requires: %{lib_name} = %{version} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %mklibname wiimote 1 -d %description -n %{devel_name} This package contains the header files and libraries needed for developing programs using the %{oname} Wiimote library. %package -n python-%{name} Summary: Python bindings for the %{name} Wiimote library Group: System/Libraries %description -n python-%{name} This package contains Python bindings for the %{oname} Wiimote library. %prep %setup -q -n %{distname} %patch0 -p1 -b .wmdemo_dso %patch1 -p0 %build # TV: fix missing configure: [[ -f configure ]] || autoreconf %configure2_5x \ --disable-ldconfig \ --docdir=%{_docdir}/%{name} %make WARNFLAGS="%{optflags} -Wall" %install %makeinstall_std install -m 0644 -D %{SOURCE1} %{buildroot}%{_unitdir}/cwiid.service %post %_post_service cwiid %preun %_preun_service cwiid %files %doc README %docdir %{_docdir}/%{name} %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/wminput %config(noreplace) %{_sysconfdir}/%{name}/wminput/* %{_unitdir}/cwiid.service %{_bindir}/lswm %{_bindir}/wmgui %{_bindir}/wminput %{_mandir}/man1/*.1* %files -n %{lib_name} %{_libdir}/lib%{name}.so.%{lib_major}* %{plugins_dir}/*.so %files -n %{devel_name} %{_includedir}/%{name}.h %{_libdir}/lib%{name}.a %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/cwiid.pc %files -n python-%{name} %{py_platsitedir}/%{name}.so %{py_platsitedir}/*.egg-info %changelog * Sun Jan 13 2013 alien <alien> 0.6.01-5.mga3 + Revision: 361369 - set higher rate limit for cwiid * Fri Jan 11 2013 umeabot <umeabot> 0.6.01-4.mga3 + Revision: 348523 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Jan 07 2013 alien <alien> 0.6.01-3.mga3 + Revision: 341307 - start cwiid at boot time - add a systemd service * Mon Aug 06 2012 sander85 <sander85> 0.6.01-2.mga3 + Revision: 279510 - Add patch from Fedora to fix build. * Fri Sep 09 2011 tv <tv> 0.6.01-1.mga2 + Revision: 141624 - fix file list - s/autoconf/autoreconf/ - fix missing configure - disable patches 0 & 2 - new release - use xz sources * Mon Mar 28 2011 rtp <rtp> 0.6.00-6.mga1 + Revision: 78420 - fix python extension link + ennael <ennael> - clean spec file - imported package cwiid