%if 0%{?rhel} <= 5 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif Name: pyspotify Version: 1.6.1 Release: 1%{?dist} Summary: Python bindings for libspotify Group: Development/Libraries License: ASL 2.0 URL: http://pyspotify.mopidy.com Source0: http://github.com/mopidy/pyspotify/tarball/v1.6.1 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: libspotify-devel python2-devel python-sphinx %description Python bindings for the official Spotify API %prep %setup -q -c DIR=`ls -d mopidy-pyspotify-*` mv $DIR/* ./ mv $DIR/.[a-zA-Z0-9]* ./ rmdir $DIR %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build cd docs make man %install rm -rf $RPM_BUILD_ROOT CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cp -a docs/_build/man/* $RPM_BUILD_ROOT%{_mandir}/man1/ %clean rm -rf $RPM_BUILD_ROOT %{?filter_setup: %filter_provides_in %{python_sitearch}.*\.so$ %filter_setup } %files %defattr(-,root,root,-) %doc LICENSE README.rst %{python_sitearch}/pyspotify* %{python_sitearch}/spotify %{_mandir}/man1/* %changelog * Wed Jan 4 2012 Jonathan Dieter - 1.6.1-1 - Initial release