Summary: The Python Imaging Library
Summary(ja): Python イメージ処理ライブラリ
Name: python-imaging
Version: 1.1.7
Release: 2%{?_dist_release}
License: Distributable
Group: Development/Languages
URL: http://www.pythonware.com/products/pil
Source0: http://effbot.org/downloads/Imaging-%{version}.tar.gz
Patch0: Imaging-1.1.7-setup.lib64.patch
BuildRequires: python-devel >= 2.6
BuildRequires: libjpeg-devel libpng-devel zlib-devel freetype2-devel
BuildRequires: xorg-x11-devel
BuildRequires: sane-devel
Requires: python >= 2.6
Requires: libjpeg >= 6a
Requires: libpng >= 1.0.12
Requires: zlib >= 1.1.4
Requires: freetype2 >= 2.1.3
Provides: Imaging, python-PIL
Obsoletes: Imaging < %{version}
Obsoletes: python-PIL < %{version}
Obsoletes: python-Imaging <= %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Distribution: Vine Linux
Vendor: Project Vine
Packager: owa

%description
The Python Imaging Library (PIL) adds image processing capabilities
to your Python environment.  This library provides extensive file
format support, an efficient internal representation, and fairly
powerful image processing capabilities.
%description -l ja
Python Imaging Library (PIL) は Python 環境にイメージ処理能力を加えます.
このライブラリには広範なファイル型式への対応, 効果的な内部表現, そして
真にパワフルなイメージ処理能力が備わっています.


%prep
%setup -q -n Imaging-%{version}
%ifarch x86_64
%patch0 -p1 -b .lib64~
%endif


%build
python setup.py build_ext -i
python selftest.py


%install
rm -rf $RPM_BUILD_ROOT
python setup.py install --root=$RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_includedir}/python%{pyver}/PIL
cp -p libImaging/*.h $RPM_BUILD_ROOT%{_includedir}/python%{pyver}/PIL/

mkdir -p $RPM_BUILD_ROOT%{python_sitearch}/Sane
pushd Sane
python setup.py install --root=$RPM_BUILD_ROOT --install-lib=%{python_sitearch}/Sane
install -m644 demo_numarray.py $RPM_BUILD_ROOT%{python_sitearch}/Sane
install -m644 CHANGES README sanedoc.txt $RPM_BUILD_ROOT%{python_sitearch}/Sane
popd


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc BUILDME CHANGES CONTENTS README
%doc Docs
%dir %{python_sitearch}/PIL
%dir %{python_sitearch}/Sane
%{_bindir}/pil*.py
%{_includedir}/python%{pyver}/PIL/*.h
%{python_sitearch}/PIL.pth
%{python_sitearch}/PIL/*
%{python_sitearch}/Sane/*


%changelog
* Sat May 07 2011 Shu KONNO <owa@bg.wakwak.com> 1.1.7-2
- install PIL with setup.py
- install Sane with setup.py
- install %{_bindir}/pil*.py
- added BR: sane-devel

* Thu Feb 03 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.7-1
- new upstream release
- recreated Patch0

* Wed Feb 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.6-3
- rebuild for python-2.6

* Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.6-2vl5
- rebuilt with python-2.5.2

* Sat Jun 14 2008 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.6-1vl5
- applied new versioning policy and spec in utf-8
- added BuildRequires: xorg-x11-devel
- fixed typo at Distribution

* Sat Dec 01 2007 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.6-0vl4
- fixed prereq, buildrequires pkgs

* Wed Mar 21 2007 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.6-0vl2
- updated Imaging to 1.1.6
- added BuildRequires: XOrg-devel zlib-devel libjpeg-devel libpng-devel freetype2-devel

* Sat Oct 14 2006 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.5-0vl5
- added Imaging-1.1.5-setup.lib64.patch
- rebuilt for x86_64 architecture support

* Wed May 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> python-imaging-1.1.5-0vl4
- changed Group:

* Fri Oct 07 2005 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.5-0vl3
- rebuilt

* Sun May 22 2005 Shu KONNO <owa@bg.wakwak.com> python-imaging-1.1.5-0vl2
- changed package name 'python-Imaging' to 'python-imaging'

* Fri May 20 2005 Shu KONNO <owa@bg.wakwak.com> python-Imaging-1.1.5-0vl1
- changed package name 'Imaging' to 'python-Imaging'
- updated Python Imaging Library (PIL) to 1.1.5
- rebuilt with python-2.4

* Thu May 02 2002 Satoshi MACHINO <machino@vinelinux.org> 1.1.3-0vl1
- updated 1.1.3

* Thu Jul 26 2001 Satoshi MACHINO <machino@vinelinux.org> 1.1.2-0vl1
- updated 1.1.2

* Thu Aug 03 2000 MACHINO, Satoshi <mac@netfort.gr.jp>
- Imaging-1.1-0vl1
- build on VineSeed

* Sun Mar  7 1999 MATSUMOTO Shoji <vine@flatout.org>
- make spec
