# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define svnrev 5798 Name: trac-mercurial-plugin Version: 0.10.0.2 Release: 3.20070705svn%{svnrev}%{?dist} Summary: Mercurial plugin for Trac Group: Applications/Internet License: GPL URL: http://trac.edgewall.org/wiki/TracMercurial # Source comes from SVN right now: svn co -r %{svnrev} http://svn.edgewall.com/repos/trac/sandbox/mercurial-plugin/; \ # cd mercurial-plugin; \ # python setup.py sdist --formats gztar Source0: TracMercurial-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools Requires: mercurial, trac, python-setuptools %description This plugin for Trac provides support for the Mercurial SCM. %prep %setup -n TracMercurial-%{version} -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT # skip-build doesn't work on el4 %{__python} setup.py install -O1 --root $RPM_BUILD_ROOT # Remove installed doc files, we grab them later rm $RPM_BUILD_ROOT/usr/COPYING rm $RPM_BUILD_ROOT/usr/README %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING README # For noarch packages: sitelib %{python_sitelib}/* %changelog * Thu Jul 05 2007 Jesse Keating - 0.10.0.2-3.20070705svn5798 - Require trac, python-setuptools as well * Thu Jul 05 2007 Jesse Keating - 0.10.0.2-2.20070705svn5798 - Require mercurial * Thu Jul 05 2007 Jesse Keating - 0.10.0.2-1.20070705svn5798 - Initial build