# 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 1536
Name: trac-git-plugin
Version: 0.0.1
Release: 6.20070705svn%{svnrev}%{?dist}
Summary: GIT version control plugin for Trac
Group: Applications/Internet
License: GPLv2+
URL: http://trac-hacks.org/wiki/GitPlugin
# Source comes from SVN right now: svn co -r %{svnrev} http://trac-hacks.org/svn/gitplugin; \
# cd gitplugin/0.10/; \
# python setup.py sdist --formats gztar
Source0: TracGit-%{version}.tar.gz
# Patches from from the http://nanosleep.org/proj/trac-git-plugin git tree:
# git clone http://nanosleep.org/git/trac-git-plugin
# cd trac-git-plugin
# git-format-patch 95450cae9ead85bf713e74b2ecace8c467d4107c
Patch1: 0001-Add-a-dummy-get_last_modified-to-avoid-an-exceptio.patch
Patch2: 0002-Add-caching-logic.patch
Patch3: 0003-Add-a-quick-hack-to-prevent-code-500-errors-and-trac.patch
Patch4: 0004-Fixed-directory-creation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: git-core, trac, python-setuptools
%description
This Trac plugin provides support for the GIT SCM.
%prep
%setup -n TracGit-%{version} -q
%patch1 -p2
%patch2 -p2
%patch3 -p2
%patch4 -p2
%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
* Mon Sep 8 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.0.1-6.20070705svn1536
- fix license tag
* Fri May 16 2008 Jesse Keating <jkeating@redhat.com> - 0.0.1-5.20070705svn1536
- Add patches from http://nanosleep.org/proj/trac-git-plugin
* Mon Nov 26 2007 Jesse Keating <jkeating@redhat.com> - 0.0.1-4.20070705svn1536
- Add a patch to prevent tracebacks when using this plugin
* Thu Jul 05 2007 Jesse Keating <jkeating@redhat.com> - 0.0.1-3.20070705svn1536
- Require trac and python-setuptools as well
* Thu Jul 05 2007 Jesse Keating <jkeating@redhat.com> - 0.0.1-2.20070705svn1536
- Require git-core
* Thu Jul 05 2007 Jesse Keating <jkeating@redhat.com> - 0.0.1-1.20070705svn1536
- Initial build