Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           pyexiv2
Version:        0.1.3
Release:        3%{?dist}
Summary:        Python binding to exiv2

Group:          Development/Languages
License:        GPLv2+
URL:            http://tilloy.net/dev/pyexiv2/
Source0:        http://tilloy.net/dev/pyexiv2/releases/pyexiv2-%{version}.tar.bz2
# next patch should be removed when
# https://bugs.launchpad.net/pyexiv2/+bug/249513
# is fixed
Patch0:         pyexiv2-multilib.patch
# the same for bug
# https://bugs.launchpad.net/pyexiv2/+bug/249835
Patch1:         pyexiv2-packager.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
      
BuildRequires:  python-devel exiv2-devel boost-devel scons

%description
pyexiv2 is a python binding to exiv2, the C++ library for manipulation
of EXIF and IPTC image metadata. It is a python module that allows your
python scripts to read and write metadata (EXIF, IPTC, thumbnail)
embedded in image files (JPEG, TIFF, ...). 

%prep
%setup -q
%patch0 -p1 -b .multilib
%patch1 -p1 -b .packager

%build
# Remove CFLAGS=... for noarch packages (unneeded)
#CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{optflags}"
scons

%install
rm -rf $RPM_BUILD_ROOT
#%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{optflags}"
scons DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%check
# There is unittest/ directory available, but not sure, how
# how to make it work.

%files
%defattr(-,root,root,-)
%doc README ChangeLog COPYING doc/
%{python_sitearch}/*

%changelog
* Sat Apr 18 2009 Matěj Cepl <mcepl@redhat.com> - 0.1.3-3
- Rebuild after exiv2 was fixed.
- Library shouldn't have executable bit set.

* Thu Apr 16 2009 Matěj Cepl <mcepl@redhat.com> - 0.1.3-1
- New upstream release (closes bug 494419)

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-9.1.20090109bzr107
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Jan 09 2009 Matej Cepl <mcepl@redhat.com> 0.1.2-8.1.20090109bzr107
- New snapshot from upstream pyexiv2-0.2 branch in order to be compatible
  with the current package of exiv2.

* Thu Dec 18 2008 Rex Dieter <rdieter@fedoraproject.org> - 0.1.2-6 
- respin (eviv2)

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1.2-5
- Rebuild for Python 2.6

* Thu Sep 11 2008 Jesse Keating <jkeating@redhat.com> - 0.1.2-4
- Rebuild for deps

* Fri Jul 18 2008 Matěj Cepl <mcepl@redhat.com> 0.1.2-3
- Fix building system.
- Approved for Fedora 

* Fri Jul 18 2008 Matěj Cepl <mcepl@redhat.com> 0.1.2-2
- Dan's patch to fix compilation flags.

* Thu Jul 17 2008 Matěj Cepl <mcepl@redhat.com> 0.1.2-1
- initial build