%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: pyifp Version: 0.2.2 Release: 1%{?dist} Summary: Python Bindings for libifp Group: Development/Languages License: GPLv2 URL: http://ifp-gnome.sourceforge.net/ Source0: http://downloads.sourceforge.net/ifp-gnome/%{name}-%{version}.tar.gz # From Gentoo: Patch0: pyifp-0.2.2-setup-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libifp-devel BuildRequires: libusb-devel BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: swig %description The pyifp module is a wrapper around libifp designed to make it easy to write python based programs to manage the iFP class of devices. (A line of portable media players manufactured by iRiver.) %prep %setup -q %patch0 -p1 %build CFLAGS="$RPM_OPT_FLAGS" %{__python} -c 'import setuptools; execfile("setup.py")' build %install rm -rf $RPM_BUILD_ROOT %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING README.txt %{python_sitearch}/* %{_bindir}/backup-ifp %{_bindir}/pyifp-test %changelog * Fri Dec 12 2008 Conrad Meyer - 0.2.2-1 - Initial package.