Blob Blame History Raw
# 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:        4.20070705svn%{svnrev}%{?dist}
Summary:        GIT version control plugin for Trac

Group:          Applications/Internet
License:        GPL
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
Patch0:         trac-git-plugin-traceback.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
%patch0 -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 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