Blob Blame History Raw
Name:           rss2email
Version:        2.71
Release:        2%{?dist}
Summary:        Deliver news from RSS feeds to your SMTP server as text or HTML mail

Group:          Applications/Internet
License:        GPLv2 or GPLv3
URL:            http://www.allthingsrss.com/rss2email/
Source0:        http://www.allthingsrss.com/rss2email/rss2email-%{version}.tar.gz 
# Fedora variant of the "r2e" shell-wrapper script to run rss2email.py
# in its home directory.
Source3:        rss2email-r2e
# man page taken from 
# http://ftp.debian.org/debian/pool/main/r/rss2email/rss2email_2.60-3.diff.gz
Source4:        rss2email-r2e.1

# Let rss2email also look for ${HOME}/.rss2email/config.py
# Remove the sys.path.insert(0,'.') module search path list alteration.
# Problem and intended purpose of the patch reported upstream.
Patch0:         rss2email-2.70-config-location.patch

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# These Python modules are imported by rss2email.
# The rss2email tarball contains copies of them, because some dists ship
# old modules which result in rss2email bug reports. We want to use the
# external packages due to Fedora packaging policies.
#
# 2011-01-12
#  - feedparser in Fedora 14 : 4.1
#  - feedparser in rss2email 2.66 to 2.70 : 4.2-pre
# 2011-04-11
#  - feedparser 5.0.2 in Fedora >= 14
#  - html2text 3.02 on its way to Fedora >= 15
Requires:       python-feedparser >= 5.0.1
Requires:       python-html2text >= 3.01

%description
rss2email lets you subscribe to a list of XML newsfeeds (RSS or Atom). It can
parse them regularly with the help of cron and send new items to you by email.

An HTML mail will be send in the default configuration to the local SMTP server.
See the manual page r2e for details on how to set up rss2email.


%prep
#setup -q

# 2.71 tarball contains bad file permissions
%setup -q -c -n %{name}-fakeroot
chmod +x *
chmod +rw * -R
cp -a %{name}-%{version}/* .

chmod -x CHANGELOG readme* config*
# prepare the custom "r2e" wrapper script
cat %{SOURCE3} | sed -e 's!@datadir@!%{_datadir}!' > r2e

%patch0 -p1 -b .config-location
sed -i -e 's/\r//' CHANGELOG rss2email.py config.py.example


%build
echo nothing to build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p  \
   $RPM_BUILD_ROOT%{_bindir}/ \
   $RPM_BUILD_ROOT%{_datadir}/%{name}/  \
   $RPM_BUILD_ROOT%{_mandir}/man1/

install -p -m 0755 rss2email.py $RPM_BUILD_ROOT%{_datadir}/%{name}/
install -p -m 0755 r2e $RPM_BUILD_ROOT%{_bindir}/r2e
install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/r2e.1
# the copy in docdir may not be present for an --excludedocs install
install -p -m 0644 config.py.example $RPM_BUILD_ROOT%{_datadir}/%{name}/


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CHANGELOG readme.html config.py.example
%{_bindir}/*
%{_datadir}/%{name}/
%{_mandir}/man1/*

%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.71-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Apr 11 2011 Michael Schwendt <mschwendt@fedoraproject.org> - 2.71-1
- Upgrade to 2.71.
- Fix bad tarball permissions.
- Increase minimum version in python-feedparser and python-html2text
  dependencies to match what upstream wants for this release.

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.70-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jan 12 2011 Michael Schwendt <mschwendt@fedoraproject.org> - 2.70-1
- Upgrade to 2.70.
- Update r2e wrapper script.
- Patch config.py loader (now first look in current dir like upstream,
  but if not found look for $HOME/.rss2email/config.py).
- Include config.py.example also in the documentation directory.
- Various minor spec file adjustments.

* Sun Jul 04 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.66-1
- update to 2.66, which now is shipped in a tarball 

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.65-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.65-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jan 06 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.65-1
- update to 2.65
- recreate rss2email-use-configpy-from-homedir.patch

* Sun Oct 26 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.64-1
- update to 2.64
- drop rss2email-warn-if-problems-with-local-mta.patch, something similar now
  upstream

* Fri Jul 04 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.63-1
- update to 2.63 (GPLv3 now)

* Sat Jan 19 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.62-1
- Update to 2.62

* Fri Dec 14 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.61-1
- Update to 2.61

* Fri Aug 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info>
- Update License field due to the "Licensing guidelines changes"

* Sun Mar 24 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-3
- Use sed instead of dos2unix
- Some small fixes from review bug #233715
- Apply one patch from Debian that should warn if there are problems with
  local delivery via sendmail

* Sat Mar 24 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-2
- Seperate package for html2text, as it might be useful for other stuff
  as well
- update r2e and make it possible to manage different feed files (optional,
  use r2e option "--feedext foo" to use it)
- add some common used, but-no-so-well documented configuration parameters
  to config.py template and give a hint where to find docs what they do

* Fri Mar 23 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 2.60-1
- Initial package