%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Summary: Quick creation of patches against a project source tree Name: patcher Version: 0.6 Release: 3%{?dist} Group: Development/Tools License: GPLv2+ Url: http://labix.org/patcher Source0: http://labix.org/download/patcher/%{name}-%{version}.tar.bz2 # (misc) patch sent to upstream by mail on 12/01/2009 # the patch silence warnings on python 2.6 Patch0: patcher-0.6-python26.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildArch: noarch %description Patcher is a tool for quick creation of patches against a project source tree. Patcher functionality resembles a lightweight version control system. It has no repository, and only controls differences between a pristine version and a working copy. %prep %setup -q %patch0 -p0 # remove rpmlint warning %{__sed} -i -e 's|^#!/usr/bin/python.*||' patcher/{commands/,}*.py %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root %{buildroot} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/ptr %python_sitelib/%{name}/ %python_sitelib/*.egg-info %changelog * Sun Apr 11 2010 Terje Rosten - 0.6-3 - Various review fixes * Tue Mar 30 2010 Michael Scherer - 0.6-2 - use %%global instead of define - remove spurious echo - use %%{_foo} when possible - fix %%defattr * Fri Feb 5 2010 Michael Scherer - 0.6-1 - Initial pacakge, based on the spec file written for Mandriva