# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-couchdb Version: 0.6 Release: 2%{?dist} Summary: A Python library for working with CouchDB Group: Development/Languages License: BSD URL: http://code.google.com/p/couchdb-python/ Source0: http://pypi.python.org/packages/source/C/CouchDB/CouchDB-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: python-couchdb-shebang.patch BuildArch: noarch BuildRequires: python-devel Requires: couchdb Requires: python-httplib2 Requires: python-simplejson %package devel Summary: The API reference files for CouchDB Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description Providing a convenient high level interface for the CouchDB server. %description devel This package contains the CouchDB API reference documentation for use in development. %prep %setup -q -n CouchDB-%{version} %patch0 -p1 %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT # calm rpmlint down find $RPM_BUILD_ROOT/%{python_sitelib}/couchdb -name \*.py -print0 | xargs --null chmod 0644 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc ChangeLog.txt COPYING README.txt %{_bindir}/* %{python_sitelib}/* %files devel %defattr(-,root,root,-) %doc doc/* %changelog * Mon Dec 14 2009 Jef Spaleta - 0.6-2 - Specfile cleanup based on review feedback * Wed Nov 25 2009 Sebastian Dziallas - 0.6-1 - initial packaging