pghmcfc pushed to trac-spamfilter-plugin (el5). "Update to current svn snapshot for 0.10 branch (0.2.1, r13321) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Mar 31 14:36:06 UTC 2015


>From b7e53d5ff5dd67aea1f63f6f7409e4e5e6c8f1e2 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Tue, 31 Mar 2015 15:34:30 +0100
Subject: Update to current svn snapshot for 0.10 branch (0.2.1, r13321)

- Update to current svn snapshot for 0.10 branch (cumulative bug-fix release)
- Drop dependency on orphaned (apparently dead upstream) spambayes
- BuildRequire everything that we Require to avoid unpleasant dependency
  surprises with the built package

diff --git a/.gitignore b/.gitignore
index e01df55..e1ab1f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-TracSpamFilter-0.2.1dev-r6990.tar.gz
+/TracSpamFilter-0.2.1dev-r6990.tar.gz
+/TracSpamFilter-0.2.1dev-r13321.tar.bz2
diff --git a/pull-from-svn.sh b/pull-from-svn.sh
new file mode 100755
index 0000000..341f1de
--- /dev/null
+++ b/pull-from-svn.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Source for trac-spamfilter-plugin comes from SVN repository at svn.edgewall.com
+site=http://svn.edgewall.com/
+repo=repos/trac/plugins
+svnname=spam-filter
+tarname=TracSpamFilter
+
+# Specify the branch and revision we're after, plus the version upstream calls itself
+branch=0.10
+svnrel=13321
+version=0.2.1
+
+# Pull the desired version from svn
+svn checkout -r ${svnrel} ${site}${repo}/${branch}/${svnname} ${tarname}-${version}
+
+# Make timestamps be that of last upstream change
+find ${tarname}-${version} -name .svn -prune -o -print |
+while read pathname
+do
+	timestamp=$(svn info ${pathname} | awk '/^Last Changed Date:/ { print $4 " " $5 " " $6 }')
+	touch --date="${timestamp}" ${pathname}
+done
+
+# Make a tarball
+cd ${tarname}-${version}
+python setup.py sdist --formats bztar
+# Work around svn 1.0 incompatibility (http://trac.edgewall.org/ticket/10658)
+if [ ! -f dist/${tarname}-${version}dev-r${svnrel}.tar.bz2 -a -f dist/${tarname}-${version}dev-r0.tar.bz2 ]; then
+	tar xfj dist/${tarname}-${version}dev-r0.tar.bz2
+	rm dist/${tarname}-${version}dev-r0.tar.bz2
+	grep -rl dev-r0 ${tarname}-${version}dev-r0 | xargs sed -i -e "s/dev-r0/dev-r${svnrel}/"
+	mv ${tarname}-${version}dev-r0 ${tarname}-${version}dev-r${svnrel}
+	tar cfj dist/${tarname}-${version}dev-r${svnrel}.tar.bz2 ${tarname}-${version}dev-r${svnrel}
+fi
+cd -
+mv ${tarname}-${version}/dist/${tarname}-${version}dev-r${svnrel}.tar.bz2 .
+# Set time of tarball to time of last commit
+timestamp=$(svn info ${tarname}-${version} | awk '/^Last Changed Date:/ { print $4 " " $5 " " $6 }')
+touch --date="${timestamp}" ${tarname}-${version}dev-r${svnrel}.tar.bz2
+
+# Display checkout status
+svn info ${tarname}-${version} | grep "Last Changed"
+
+# Remove the svn checkout
+rm -rf ${tarname}-${version}
diff --git a/sources b/sources
index c74f2a3..d7f3382 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2e0f0bf135094d12b209e59d7aa16d60  TracSpamFilter-0.2.1dev-r6990.tar.gz
+503ad010c509371b70e73dbffbb9a8af  TracSpamFilter-0.2.1dev-r13321.tar.bz2
diff --git a/trac-spamfilter-plugin.spec b/trac-spamfilter-plugin.spec
index b6995f5..cab00dd 100644
--- a/trac-spamfilter-plugin.spec
+++ b/trac-spamfilter-plugin.spec
@@ -1,57 +1,60 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" 2>/dev/null)}
 
-%define svnrev 6990
+%global svnrev 13321
 
 Name:           trac-spamfilter-plugin
 Version:        0.2.1
-Release:        0.2.20080603svn%{svnrev}%{?dist}
+Release:        0.3.20141115svn%{svnrev}%{?dist}
 Summary:        Spam-Filter plugin for Trac
-
 Group:          Applications/Internet
 License:        BSD
 URL:            http://trac.edgewall.org/wiki/SpamFilter
-# Source comes from SVN right now: svn co -r %{svnrev} http://svn.edgewall.com/repos/trac/sandbox/spam-filter; \
-#                                  cd spam-filter/; \
-#                                  python setup.py sdist --formats gztar
-Source0:        TracSpamFilter-%{version}dev-r%{svnrev}.tar.gz
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+Source0:        TracSpamFilter-%{version}dev-r%{svnrev}.tar.bz2
+Source1:        pull-from-svn.sh
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:      noarch
-BuildRequires:  python-devel
+BuildRequires:  python2-devel
+BuildRequires:  python-dns
 BuildRequires:  python-setuptools
-Requires:       trac, python-setuptools, spambayes
+BuildRequires:  trac >= 0.10
+Requires:       python-dns
+Requires:       python-setuptools
+Requires:       trac >= 0.10
 
 %description
-Trac plugin for spam filtering.
+TracSpamFilter is a plugin for Trac (http://trac.edgewall.com/) that provides
+an infrastructure for detecting and rejecting spam (or other forms of
+illegitimate/unwanted content) in submitted content.
 
 %prep
 %setup -n TracSpamFilter-%{version}dev-r%{svnrev} -q
 
-
 %build
 %{__python} setup.py build
 
-
 %install
-rm -rf $RPM_BUILD_ROOT
-# skip-build doesn't work on el4
-%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
  
 %clean
-rm -rf $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
 
 %files
-%defattr(-,root,root,-)
-# For noarch packages: sitelib
-%doc README.txt
-%{python_sitelib}/*
-
+%doc ATTENTION README.txt
+%{python_sitelib}/TracSpamFilter-%{version}dev_r%{svnrev}-py*.egg-info/
+%dir %{python_sitelib}/tracspamfilter/
+%{python_sitelib}/tracspamfilter/*.py*
+%{python_sitelib}/tracspamfilter/filters/
+%{python_sitelib}/tracspamfilter/htdocs/
+%{python_sitelib}/tracspamfilter/templates/
 
 %changelog
+* Tue Mar 31 2015 Paul Howarth <paul at city-fan.org> - 0.2.1-0.3.20141115svn13321
+- Update to current svn snapshot for 0.10 branch (cumulative bug-fix release)
+- Drop dependency on orphaned (apparently dead upstream) spambayes
+- BuildRequire everything that we Require to avoid unpleasant dependency
+  surprises with the built package
+
 * Fri Jul 04 2008 Jesse Keating <jkeating at redhat.com> - 0.2.1-0.2.20080603svn6990
 - R spambayes
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/trac-spamfilter-plugin.git/commit/?h=el5&id=b7e53d5ff5dd67aea1f63f6f7409e4e5e6c8f1e2


More information about the scm-commits mailing list