Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}

Summary:       A set of scripts to work locally on subversion checkouts using mercurial
Name:          hgsvn
Version:       0.1.5
Release:       3%{?dist}
License:       GPLv3+
Group:         Development/Tools
URL  :         http://pypi.python.org/pypi/%{name}/
Source0:       http://pypi.python.org/packages/source/h/%{name}/%{name}-%{version}.tar.gz
BuildArch:     noarch
Requires:      mercurial subversion python-setuptools
BuildRequires: python-devel
# Needed in %%check 
BuildRequires: mercurial python-nose subversion
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%else
BuildRequires: python-setuptools
%endif
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
This set of scripts allows to work locally on subversion managed
projects using the mercurial distributed version control system.

Why use mercurial? You can do local (disconnected) work, pull the
latest changes from the subversion server, manage private branches,
submit patches to project maintainers, etc. And of course you have
fast local operations like hg log and hg annotate.

%prep
%setup -q

%build
CFLAGS="%{optflags}" %{__python} setup.py build

%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

%clean
%{__rm} -rf %{buildroot}

%check
%{__python} setup.py test

%files
%defattr(-, root, root, -)
%doc AUTHORS.txt COPYING.txt README.txt TODO.txt
%{_bindir}/hgimportsvn
%{_bindir}/hgpullsvn
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}-%{version}-py%{pyver}.egg-info

%changelog
* Sat Feb 16 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.1.5-3
- Add setuptools to req, (Ian Burrell, bz #433050)

* Sun Jan 27 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.1.5-2
- Add %%check section and build req as needed
- Add req on mercurial and subversion

* Fri Jan 25 2008 Terje Rosten <terje.rosten@ntnu.no> - 0.1.5-1
- Initial build