%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
)}
%define oname exif-py
Summary: Python module to extract EXIF information
Name: python-exif
# Remember to update setup.py
Version: 1.0.8
Release: 1%{?dist}
License: BSD
Group: Development/Libraries
URL: http://sourceforge.net/projects/%{oname}/
Source0: http://downloads.sourceforge.net/%{oname}/EXIFpy_%{version}.tar.gz
Source1: setup.py
Source2: EXIF
BuildArch: noarch
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Python Library to extract EXIF information in digital camera image files
%prep
%setup -q -c
%{__cp} %{SOURCE1} .
%{__cp} %{SOURCE2} .
%{__chmod} 0644 EXIF.py
%{__sed} -e "/^# ----- See 'changes.txt'/q" EXIF.py > COPYING
%{__chmod} 0644 COPYING
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__chmod} 0755 %{buildroot}%{python_sitelib}/EXIF.py
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-, root, root, -)
%doc COPYING changes.txt
%{_bindir}/EXIF
%{python_sitelib}/EXIF*
%changelog
* Fri Aug 15 2008 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.8-1
- 1.0.8
* Mon Mar 3 2008 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.7-4
- Fix script (bz #435758)
* Mon Feb 11 2008 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.7-3
- add script and changes.txt
* Sat Jan 19 2008 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.7-2
- Improve setup.py
* Thu Jan 3 2008 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.7-1
- 1.0.7
- Include egg info
* Mon Nov 19 2007 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.5-1
- 1.0.5
* Mon Aug 06 2007 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.2-3
- Tagging...
* Mon Aug 06 2007 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.2-2
- Fix typo in url
- Add python-devel to buildreq
- Add license to setup.py
- Strip code from %%doc file
- Fix typo in sitelib macro
* Sat Aug 04 2007 Terje Rosten <terjeros@phys.ntnu.no> - 1.0.2-1
- Initial build