# __python2 and python2_sitelib macros defined from Fedora 16 %{!?__python2: %define __python2 /usr/bin/python2} %{!?python2_sitelib: %define python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: svnmailer Version: 1.1.0 Release: 0.7.20050925svn1373%{?dist} Summary: Feature rich subversion commit notification tool License: ASL 2.0 URL: http://opensource.perlig.de/svnmailer/ Source0: http://storage.perlig.de/svnmailer/svnmailer-1.1.0-dev-r1373.tar.bz2 Patch0: svnmailer-1.1.0-python2.5.diff Patch1: svnmailer-1.1.0-utf8.patch Patch3: svnmailer-1.1.0-metadata.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils BuildRequires: python2-devel >= 2.4 BuildRequires: subversion >= 1.0.0 Requires: subversion >= 1.0.0 # subversion-python split out from subversion from Fedora 15, renamed to python2-subversion from Fedora 28 %if 0%{?fedora} > 14 || 0%{?rhel} > 6 %if 0%{?fedora} > 27 BuildRequires: python2-subversion Requires: python2-subversion %else BuildRequires: subversion-python Requires: subversion-python %endif %endif %description Svnmailer is a tool to post subversion repository commit information by mail, news or XML (to a CIA tracker for example). %package doc Summary: Developer and API documentation for svnmailer %description doc This package contains developer information and API documentation for the svnmailer tool. %prep %setup -q -n %{name}-%{version}-dev-r1373 # python 2.5 compatibility patch based on one from gentoo (http://bugs.gentoo.org/209857) %patch0 # Recode as utf8 %patch1 # Don't break the python provides generator %patch3 # Fix script locations for samples before setup.py mangles them find sample/hooks -type f | xargs sed -i -e 's|@@SCRIPTS@@|%{_bindir}|' %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-data %{_datadir} %files %if 0%{?_licensedir:1} %license LICENSE %else %doc LICENSE %endif %doc README CHANGES CREDITS NOTICE %{_bindir}/svn-mailer %{python2_sitelib}/svnmailer/ %{python2_sitelib}/svnmailer*.egg-info %{_mandir}/man1/svn-mailer.1* %files doc %{_docdir}/svnmailer/ %changelog * Sun Oct 25 2020 Paul Howarth - 1.1.0-0.7.20050925svn1373 - Fix FTBFS due to bad metadata - Recode as utf8 * Thu Jan 18 2018 Paul Howarth - 1.1.0-0.6.20050925svn1373 - Explicitly use python2 - BR:/R: subversion-python * Sun Dec 24 2017 Paul Howarth - 1.1.0-0.5.20050925svn1373 - Use %%license where possible - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section - Drop %%defattr, redundant since rpm 4.4 - %%{python_sitelib} always defined - Always have python ≥ 2.4 and egg-info * Thu Aug 4 2011 Paul Howarth - 1.1.0-0.4.20050925svn1373 - Fix "ImportError: cannot import name exceptions" (http://bugs.gentoo.org/209857) - BR: python2-devel rather than just python-devel - Nobody else likes macros for commands * Wed Jul 28 2010 Paul Howarth - 1.1.0-0.3.20050925svn1373 - Rebuild for python 2.7 in Rawhide * Tue Jul 7 2009 Paul Howarth - 1.1.0-0.2.20050925svn1373 - Fix release number to satisfy current Fedora snapshot naming guideline - Fix license tag to satisfy current Fedora packaging guideline - Define RPM macros in global scope - Fix up python dependencies to work all the way back to EL-4 - Fix up sample hook scripts to avoid buildroot contamination - Cater for egg-info if present * Thu Oct 5 2006 Paul Howarth - 1.1.0-0.1.r1373 - Update to 1.1.0-dev-r1373 - Don't bother setting compiler-optimization flags for a noarch package - Simplify %%files list - Package manpage * Sun Sep 3 2006 Michael Fleming - 1.0.8-2 - Rebuild - No longer ghost .pyo files. * Mon May 8 2006 Michael Fleming - 1.0.8-1 - Initial import into Fedora Extras - Update to new upstream version. * Tue Feb 28 2006 Michael Fleming - 1.0.7-1 - Update to new upstream version. * Wed Feb 8 2006 Michael Fleming - 1.0.6-3 - Use newer python template from fedora-rpmdevtools - Corrected license entry - Split off API / dev docs into subpackage * Tue Feb 7 2006 Michael Fleming - 1.0.6-2 - Respun spec following comments from roozbeh * Sun Feb 5 2006 Michael Fleming - 1.0.6-1 - Initial review package for Fedora Extras