%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: cwiid Version: 0.6.00 Release: 8%{?dist}.eye Summary: Wiimote interface library Group: System Environment/Libraries License: GPLv2+ URL: http://abstrakraft.org/cwiid/ Source0: http://abstrakraft.org/cwiid/downloads/cwiid-%{version}.tgz Source1: wmgui.desktop BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bluez-libs-devel, gawk, bison, flex, gtk2-devel, python-devel >= 2.4, desktop-file-utils %description Cwiid is a library that enables your application to communicate with a wiimote using a bluetooth connection. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release}, bluez-libs-devel %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package python2 Summary: Python binding for %{name} Group: Development/Languages Requires: %{name} = %{version}-%{release} %description python2 Python2 binding for %{name} %package utils Summary: Wiimote connection test application Group: Applications/System Requires: %{name} = %{version}-%{release} Provides: %{name}-wmgui = %{version}-%{release} Obsoletes: %{name}-wmgui < 0.6.00-7 %description utils Applications to test the wiimote connection %package wminput Summary: Enables using the wiimote as an input source # The licence must be GPLv2 instead of GPLv2+ for this package # since the file wminput/action_enum.txt is GPLv2 as stated # in the file. License: GPLv2 Group: Applications/System Requires: %{name} = %{version}-%{release}, %{name}-python2 %description wminput This program allows the user to use the wiimote to emulate normal system input sources like the mouse and keyboard. %prep %setup -q %build %configure CC="gcc %{optflags}" --disable-static make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' # find all directories find $RPM_BUILD_ROOT%{_sysconfdir} -type f -exec chmod 0644 {} ';' rm $RPM_BUILD_ROOT/%{_libdir}/*.a desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE1} %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS NEWS README COPYING ChangeLog %{_libdir}/*.so.* %files devel %defattr(0644,root,root,-) %{_includedir}/* %{_libdir}/*.so %files python2 %{python_sitelib}/* %files wminput %config(noreplace) %{_sysconfdir}/cwiid/ %{_bindir}/wminput %{_mandir}/man1/wminput* %{_libdir}/cwiid %{_defaultdocdir}/cwiid %files utils %{_bindir}/lswm %{_bindir}/wmgui %{_mandir}/man1/wmgui* %{_datadir}/applications/fedora-wmgui.desktop %changelog * Wed May 21 2008 Victor Bogado 0.6.00-8 - wminput requires python2. * Thu May 1 2008 Mamoru Tasaka 0.6.00-7 - Rename -wmgui to -tools and repackage. * Fri Apr 25 2008 Victor Bogado 0.6.00-6 - Fix mode for configuration files. * Thu Apr 24 2008 Victor Bogado 0.6.00-5 - comment explaining why a subpackage has a different license. - BuildRequires needed one more program. * Mon Apr 21 2008 Victor Bogado 0.6.00-4 - Source URL has version on it. * Sun Apr 20 2008 Victor Bogado - Removing files that are included twice. * Sat Apr 19 2008 Victor Bogado 0.6.00-3 - solved directory ownership problems - Changed license of wminput to GPLv2 - AUTHORS and NEWS bundled as docs. - Added desktop file - Removed static library files - Made the spec honor compiler flags. - Added bluez-libs-devel to requires of the devel package - Removed python from BuildRequires list - Added bluez-libs-devel to requires of development package * Wed Apr 09 2008 Victor Bogado 0.6.00-2 - added changelog. - doc section of files. - changed the line that specifies the python library to accomodate the file *.info that is generates with other versions of python. - cutted long description lines - fixed documentations tags * Fri Apr 05 2008 Victor Bogado - First verion