[svnmailer] Spec clean-up
Paul Howarth
pghmcfc at fedoraproject.org
Fri Oct 19 13:19:48 UTC 2012
commit 776410108d3570a63c997c2f3d2a70f0b9c44af1
Author: Paul Howarth <paul at city-fan.org>
Date: Fri Oct 19 12:56:24 2012 +0100
Spec clean-up
- BR:/R: subversion-python from F-15 onwards
- Drop %defattr, redundant since rpm 4.4
- Use %{buildroot} rather than the longer $RPM_BUILD_ROOT
- Use %global rather than %define
- Cope with builds with or without egg-info
- Don't use macros for commands
- No need to specify CFLAGS for noarch package
svnmailer.spec | 68 +++++++++++++++++++++++++++++++++++--------------------
1 files changed, 43 insertions(+), 25 deletions(-)
---
diff --git a/svnmailer.spec b/svnmailer.spec
index 65ee967..7575247 100644
--- a/svnmailer.spec
+++ b/svnmailer.spec
@@ -1,20 +1,26 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+# Where python modules live
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+
+# subversion-python package split off for Fedora 15 onwards
+%if 0%{?fedora} > 14 || 0%{?rhel} > 6
+%global svnbinding subversion-python
+%else
+%global svnbinding subversion
+%endif
Name: svnmailer
Version: 1.0.8
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Tool to post subversion repository commit information
-
Group: Development/Tools
License: ASL 2.0
URL: http://opensource.perlig.de/svnmailer/
Source0: http://storage.perlig.de/svnmailer/svnmailer-%{version}.tar.bz2
Patch0: svnmailer-multipart.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
-BuildRequires: python python-devel subversion >= 1.0.0
-Requires: subversion >= 1.0.0
+BuildRequires: python python-devel %{svnbinding} >= 1.0.0
+Requires: %{svnbinding} >= 1.0.0
%description
Svnmailer is a tool to post subversion repository commit information by mail,
@@ -26,44 +32,56 @@ Group: Development/Tools
%description doc
This package contains developer information and API documentation for the
-svnmailer tool
+svnmailer tool.
%prep
%setup -q
+
+# Fix crash when sending multipart messages (#438112)
%patch0 -b .multi
%build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
-
+%{__python} setup.py build
%install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+# See if there's any egg-info
+if [ -f %{buildroot}%{python_sitelib}/svnmailer*.egg-info ]; then
+ echo %{buildroot}%{python_sitelib}/svnmailer*.egg-info |
+ sed -e 's|^%{buildroot}||'
+fi > egg-info
%clean
-rm -rf $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
-%files
-%defattr(-,root,root,-)
+%files -f egg-info
%doc README CHANGES CREDITS LICENSE NOTICE
%{_bindir}/svn-mailer
%dir %{python_sitelib}/svnmailer
-%dir %{python_sitelib}/svnmailer/notifier
-%{python_sitelib}/svnmailer*.egg-info
%{python_sitelib}/svnmailer/*.py
%{python_sitelib}/svnmailer/*.pyc
%{python_sitelib}/svnmailer/*.pyo
+%dir %{python_sitelib}/svnmailer/notifier
%{python_sitelib}/svnmailer/notifier/*.py
%{python_sitelib}/svnmailer/notifier/*.pyc
%{python_sitelib}/svnmailer/notifier/*.pyo
%files doc
-%defattr(-,root,root,-)
%doc docs/*
%changelog
+* Fri Oct 19 2012 Paul Howarth <paul at city-fan.org> - 1.0.8-14
+- Spec clean-up:
+ - BR:/R: subversion-python from F-15 onwards
+ - Drop %%defattr, redundant since rpm 4.4
+ - Use %%{buildroot} rather than the longer $RPM_BUILD_ROOT
+ - Use %%global rather than %%define
+ - Cope with builds with or without egg-info
+ - Don't use macros for commands
+ - No need to specify CFLAGS for noarch package
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.8-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
@@ -92,22 +110,22 @@ rm -rf $RPM_BUILD_ROOT
* Tue Apr 8 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.8-5
- Update Requires (remove obsolete abi() generation)
- Add patch to fix crash when sending multipart messages (bz# 438112)
-- Update BuildRequires to fix bz# 4407884
-- Add egg-info files.
+- Update BuildRequires to fix bz# 440784
+- Add egg-info files
* Sat Dec 9 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.8-3
- Rebuild for python 2.5
* Sun Sep 3 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.8-2
- Rebuild
-- No longer ghost .pyo files.
+- No longer ghost .pyo files
* Mon May 8 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.8-1
- Initial import into Fedora Extras
-- Update to new upstream version.
+- Update to new upstream version
* Tue Feb 28 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.7-1
-- Update to new upstream version.
+- Update to new upstream version
* Wed Feb 8 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.0.6-3
- Use newer python template from fedora-rpmdevtools
More information about the scm-commits
mailing list