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

%define oname pyinotify

Summary:       Monitor filesystem events with Python under Linux
Name:          python-inotify
Version:       0.8.0
Release:       4.r%{?dist}
License:       GPLv2
Group:         Development/Libraries
URL:           http://trac.dbzteam.org/pyinotify
# Go here to browse tarballs:
# http://git.dbzteam.org/?p=pyinotify.git;a=summary
# Current tarball (Documentation 2008-06-06): 
# http://git.dbzteam.org/?p=pyinotify.git;a=snapshot;h=6253a716008486c1864f4416916bb2fe1387498c;sf=tgz
Source0:       %{oname}-%{version}r.tar.gz
Source1:       %{oname}
BuildRequires: python-devel
BuildArch:     noarch
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
This is a Python module for watching filesystems changes. pyinotify
can be used for various kind of fs monitoring. pyinotify relies on a
recent Linux Kernel feature (merged in kernel 2.6.13) called
inotify. inotify is an event-driven notifier, its notifications are
exported from kernel space to user space.

%package examples
Summary:  Examples for Python inotify module
Group:    Development/Libraries
Requires: python-inotify = %{version}-%{release}

%description examples
This package includes some examples usage of the Python inotify module,
extensive documentation is also included.

%prep
%setup -q -n %{oname}
for f in ChangeLog ; do
    mv $f $f.iso88591
    iconv -o $f -f iso88591 -t utf8 $f.iso88591
    rm -f $f.iso88591
done

%build
%{__python} setup.py build

%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__install} -d %{buildroot}%{_datadir}/%{name}
%{__cp} -a loop.py chain.py daemon.py loop.py not_quiet.py stats.py \
    stats_threaded.py transient_file.py %{buildroot}%{_datadir}/%{name}
%{__install} -D -m 0755 -p %{SOURCE1} %{buildroot}%{_bindir}/%{oname}
%{__chmod} 0755 %{buildroot}%{python_sitelib}/%{oname}.py

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc ChangeLog NEWS
%{python_sitelib}/%{oname}*
%{_bindir}/%{oname}

%files examples
%doc docstrings/*
%{_datadir}/%{name}

%changelog
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.8.0-4.r
- Rebuild for Python 2.6

* Sun Jun 22 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-3.r
- rebuild 

* Tue Jun 17 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-2.r
- 0.8.0r
- add wrapper in /usr/bin

* Mon Jun 16 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-1.q
- 0.8.0q
- Update url, license and source url

* Sat Feb  9 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.1-2
- Rebuild

* Wed Aug 08 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.1-1
- New upstream release: 0.7.1
- Fix license tag

* Mon Jun 25 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-3
- Remove autopath from example package (bz #237464)

* Tue Mar 27 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-2
- Fix email address

* Tue Mar  6 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-1
- Initial build