Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name: planet
Version: 2.0
Release: 3%{?dist}
Summary: Flexible RDF/RSS/Atom feed aggregator

Group: Applications/Internet
License: Python Software Foundation License
URL: http://www.planetplanet.org/
Source0: http://www.planetplanet.org/download/%{name}-%{version}.tar.bz2
Patch1: planet-1.0-no-shebang.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch: noarch
BuildRequires: python-devel


%description
Planet is a flexible feed aggregator, this means that it downloads feeds
and aggregates their content together into a single combined feed with
the latest news first.

It uses Mark Pilgrim's Ultra-liberal feed parser so can read from RDF, RSS
and Atom feeds and Tomas Styblo's template library to output static files
in unlimited formats based on a series of templates.


%prep
%setup -q
%patch1 -p1 -b .no-shebang

# Fix line endings.
%{__sed} -i 's/\r//' LICENCE


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

# Remove .py from install scripts, e.g. planet.py -> planet.
REGEXP='s:%{_bindir}/\(.*\).py:%{_bindir}/\1:'

for i in $RPM_BUILD_ROOT%{_bindir}/*.py; do
  mv -v $i $(echo $i | sed -e $REGEXP)
done


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS INSTALL LICENCE NEWS PKG-INFO THANKS README examples
%{_bindir}/planet*
%exclude %{_bindir}/runtests
%dir %{python_sitelib}/planet
%{python_sitelib}/planet/*.py*
%dir %{python_sitelib}/planet/compat_logging
%{python_sitelib}/planet/compat_logging/*.py*
%exclude %{python_sitelib}/planet/tests
%exclude %{python_sitelib}/planet/tests/*


%changelog
* Mon Dec 11 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 2.0-3
- Bugfix: "BuildRequires: python-devel" is needed for python 2.5 update.
- Include dist tag in release.

* Sat Dec 09 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 2.0-2
- Bugfix: Don't include python version in %%exclude in specfile.
- Bump version for python 2.5 update.

* Thu Sep 14 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 2.0-1
- Update to official 2.0 release.
- Include PKG-INFO in the documentation.

* Thu Sep 14 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.7.20060218pre
- .pyo files should no longer be %ghost'ed (bug #205393)
- Updated to follow latest Python packaging guidelines.

* Fri Mar 03 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.6.20060218pre
- Rebuild for FC-5.

* Sat Feb 18 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.5.20060218pre
- Update to planet--devel--1.0--patch-20. This is no different
  than the previous release. This is purely to use a known,
  source-controlled version.

* Sun Feb 06 2006 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.4.20060206pre
- Update to the nearly-final 1.0 release on 20060206.

* Fri Dec 09 2005 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.3.20051115arch
- Rename to planet from planetplanet.
- Include INSTALL document.
- Own planet Python sitelib subdirectories.

* Wed Nov 16 2005 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.2.20051115arch
- Correct License tag.
- Remove shebang lines from planet module code.
- Bring spec in line with Fedora's Python spec template.

* Wed Nov 16 2005 Richard Dawe <rich@phekda.gotadsl.co.uk> - 1.0-0.1.20051115arch
- Initial packaging.