Blob Blame History Raw
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif

Name:           urlwatch
Version:        1.15
Release:        5%{?dist}
Summary:        A tool for monitoring webpages for updates

Group:          Applications/Internet
License:        BSD
URL:            http://thpinfo.com/2008/urlwatch/
Source0:        http://thpinfo.com/2008/%{name}/%{name}-%{version}.tar.gz
Patch0:         %{name}_add_xmpp_functionality.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python-tools

Requires:       python-xmpp

%description
This script is intended to help you watch URLs and get notified (via
email or in your terminal) of any changes. The change notification
will include the URL that has changed and a unified diff of what has
changed.

The script supports the use of a filtering hook function to strip
trivially-varying elements of a webpage.

Basic features

* Simple configuration (text file, one URL per line)
* Easily hackable (clean Python implementation)
* Can run as a cronjob and mail changes to you
* Always outputs only plaintext - no HTML mails :)
* Supports removing noise (always-changing website parts)
* Example hooks to filter content in Python

%prep
%setup -q
%patch0 -p0 -b .xmmp
# Convert sources to Python 3 as mentioned in the README
2to3 -w urlwatch lib/urlwatch/*.py examples/hooks.py.example setup.py
sed -i '46d' setup.py

%build
%{__python3} setup.py build

%install
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
# Fix exec permission for rpmlint
chmod 0755 %{buildroot}%{python3_sitelib}/%{name}/*txt.py
chmod a+x %{buildroot}%{python3_sitelib}/%{name}/handler.py

%files
%doc ChangeLog COPYING README
%{_mandir}/man*/*.*
%{_bindir}/%{name}
%{_datadir}/%{name}/examples/
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}*.egg-info

%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 01 2013 Fabian Affolter <mail@fabian-affolter.ch> - 1.15-4
- Import error fix with python2

* Wed Feb 20 2013 Fabian Affolter <mail@fabian-affolter.ch> - 1.15-3
- Updated convert script and fix BR

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Sep 02 2012 Fabian Affolter <mail@fabian-affolter.ch> - 1.15-1
- Updated to new upstream version 1.15

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Feb 11 2012 Fabian Affolter <mail@fabian-affolter.ch> - 1.14-3
- Update for py3

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

* Thu Nov 17 2011 Fabian Affolter <mail@fabian-affolter.ch> - 1.14-1
- Updated to new upstream version 1.14

* Fri Aug 26 2011 Fabian Affolter <mail@fabian-affolter.ch> - 1.13-1
- Updated to new upstream version 1.13

* Fri Aug 12 2011 Fabian Affolter <mail@fabian-affolter.ch> - 1.12-2
- Rebuild (python-xmpp)

* Sun Mar 27 2011 Fabian Affolter <mail@fabian-affolter.ch> - 1.12-1
- Updated to new upstream version 1.12

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Nov 03 2010 Fabian Affolter <mail@fabian-affolter.ch> - 1.11-2
- Removed compression of man page

* Sat Aug 07 2010 Fabian Affolter <mail@fabian-affolter.ch> - 1.11-1
- Updated to new upstream version 1.11

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Mon May 10 2010 Fabian Affolter <mail@fabian-affolter.ch> - 1.10-1
- Fix #590638
- Updated to new upstream version 1.10

* Sat Oct 10 2009 Fabian Affolter <mail@fabian-affolter.ch> - 1.9-1
- Added patch for xmpp functionality
- Updated to new upstream version 1.9

* Thu Sep 17 2009 Fabian Affolter <mail@fabian-affolter.ch> - 1.8-1
- Minior spec file changes
- Updated to new upstream version 1.8

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

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

* Fri Jan 18 2008 Fabian Affolter <mail@fabian-affolter.ch> - 1.7-2
- Change license from MIT to BSD

* Fri Jan 18 2008 Fabian Affolter <mail@fabian-affolter.ch> - 1.7-1
- Initial package for Fedora