--- patcher.spec.orig 2010-03-30 23:39:52.000000000 +0200 +++ patcher.spec 2010-04-11 13:59:10.000000000 +0200 @@ -1,40 +1,38 @@ %{!?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: 1.1%{?dist} -Summary: Quick creation of patches against a project source tree - +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 +# (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 +BuildArch: noarch %description -Patcher is a tool for quick creation of patches against a project source tree. +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. +It has no repository, and only controls differences between a pristine version +and a working copy. %prep -%setup -q +%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 --prefix=$RPM_BUILD_ROOT/%{_prefix} -find $RPM_BUILD_ROOT/%{_prefix} -name '*pyc' | xargs rm -Rf - -# remove rpmlint warning -%{__sed} -i -e 's|^#!/usr/bin/python.*||' $RPM_BUILD_ROOT/%python_sitelib/%{name}/{commands,}/*py +%{__python} setup.py install -O1 --skip-build --root %{buildroot} %clean rm -rf $RPM_BUILD_ROOT @@ -42,16 +40,19 @@ %files %defattr(-,root,root,-) %doc LICENSE README -%{_bindir}/* +%{_bindir}/ptr %python_sitelib/%{name}/ %python_sitelib/*.egg-info %changelog -* Tue Mar 30 2010 Michael Scherer - 0.6-1.1 -- use %global instead of define +* 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 +- 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 +- Initial pacakge, based on the spec file written for Mandriva