[spambayes] No need to specify CFLAGS for a noarch package

Paul Howarth pghmcfc at fedoraproject.org
Wed Jan 11 14:52:54 UTC 2012


commit 0a52be325373a15e13946d5e385067dbb9ca1b95
Author: Paul Howarth <paul at city-fan.org>
Date:   Wed Jan 11 14:52:34 2012 +0000

    No need to specify CFLAGS for a noarch package

 spambayes.spec |   36 ++++++++++++++----------------------
 1 files changed, 14 insertions(+), 22 deletions(-)
---
diff --git a/spambayes.spec b/spambayes.spec
index a1de630..0158593 100644
--- a/spambayes.spec
+++ b/spambayes.spec
@@ -3,27 +3,22 @@
 
 Name:           spambayes
 Version:        1.1
-Release:        0.3.%{pre}%{?dist}
+Release:        0.4.%{pre}%{?dist}
 Summary:        Bayesian anti-spam filter
-
 Group:          Development/Languages
 License:        Python
 URL:            http://spambayes.sourceforge.net
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{pre}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:      noarch
 BuildRequires:  python-devel
-
 %if 0%{?fedora} >= 8
 BuildRequires:  python-setuptools-devel
 %else
 BuildRequires:  python-setuptools
 %endif
-
 Requires:       python-lockfile
 
-
 %description
 SpamBayes will attempt to classify incoming email messages as 'spam', 'ham'
 (good, non-spam email) or 'unsure'. This means you can have spam or unsure
@@ -35,33 +30,28 @@ the piles for clues as to what makes the spam and ham different. For example;
 different words, differences in the mailer headers and content style.  The
 system then uses these clues to examine new messages.
 
-
 %prep
 %setup -q -n %{name}-%{version}%{pre}
 
 # Fix rpmlint warnings
-chmod -x *.txt
-
+chmod -c -x *.txt
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} -c 'import setuptools; execfile("setup.py")' build
-
+%{__python} -c 'import setuptools; execfile("setup.py")' build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
 
 # Add exec permission for modules that can be run directly
-for f in $RPM_BUILD_ROOT%{python_sitelib}/spambayes/*.py; do
+for f in %{buildroot}%{python_sitelib}/spambayes/*.py; do
   if head -n 1 $f | grep '^#![[:space:]]*/usr/bin/env python'; then
-    chmod +x $f
+    chmod -c +x $f
   fi
 done
-
  
 %clean
-rm -rf $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
@@ -70,9 +60,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/core_server.py
 %{_bindir}/sb_*.py
 
-
 %changelog
-* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-0.3.a6
+* Wed Jan 11 2012 Paul Howarth <paul at city-fan.org> - 1.1-0.4.a6
+- No need to specify CFLAGS for a noarch package
+
+* Wed Feb  9 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-0.3.a6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * Fri Dec 10 2010 Paul Howarth <paul at city-fan.org> - 1.1-0.2.a6
@@ -81,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT
 - Add missing dependency on python-lockfile (#661942)
 
 * Sun Sep 12 2010 Thomas Janssen <thomasj at fedoraproject.org> 1.1-0.1.a6
-- update to 1.1a6
+- Update to 1.1a6
 
 * Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 1.0.4-10
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild


More information about the scm-commits mailing list