Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > b689bacf9e56070c63185042f82eb17c > files > 6

python-imaging-1.1.4-9mdk.src.rpm

%define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")

Summary:	Python's own image processing library 
Name:		python-imaging
Version: 	1.1.4
Release: 	%mkrel 9
License:	MIT style
Group:		Development/Python
URL:		http://www.pythonware.com/products/pil/

Source0:	http://www.pythonware.com/downloads/Imaging-%{version}.tar.bz2 
Source1:	pil-handbook.pdf.bz2
Patch:		Imaging-1.1.4.patch.bz2
Patch1:		python-imaging-1.1.4-freetype2.patch.bz2
Icon:		linux-python-paint-icon.gif
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires:	python >= 1.5, libjpeg >= 6b,  zlib >= 1.1.2, libpng >= 1.0.1 tix, tkinter
BuildRequires:	python-devel >= 1.5, jpeg-devel >= 6b, png-devel >= 1.0.1
BuildRequires:	tix XFree86-devel freetype2-devel tkinter tcl tk

%description
Python Imaging Library version %{version}
   
The Python Imaging Library (PIL) adds image processing capabilities 
to your Python interpreter.

This library provides extensive file format support, an efficient
internal representation, and powerful image processing capabilities.

%package devel
Summary:	Header files for python-imaging
Group:		Development/C
Requires:	python-imaging = %{version}

%description devel
Header files for the Python Imaging Library version %{version}.

%prep
%setup -q -n Imaging-%{version}
bzcat %SOURCE1 > pil-handbook.pdf

# fix tk version
perl -p -i -e 's/8.3/8.4/g' Setup.in

# fix distutils problem
%patch
%patch1 -p1
# Make sure to get the right python library
perl -pi -e "s,(\\\$\((exec_prefix|prefix|exec_installdir)\)|/usr/X11R6)/lib\b,\1/%{_lib},g" Makefile.pre.in Setup.in

# Nuke references to /usr/local
perl -pi -e "s,(-[IL]/usr/local/(include|lib)),,g" Setup.in


%build
cd libImaging
%configure2_5x
%make OPT="$RPM_OPT_FLAGS -fPIC"
cd ..
python setup.py build

%install
rm -fr $RPM_BUILD_ROOT

find . -type f | xargs perl -pi -e 's@/usr/local/bin/python@/usr/bin/python@'

python setup.py install --root=$RPM_BUILD_ROOT
cd libImaging
mkdir -p  $RPM_BUILD_ROOT%{_includedir}/python%{pyver}/
install -m 644 ImPlatform.h Imaging.h ImConfig.h $RPM_BUILD_ROOT%{_includedir}/python%{pyver}/
%multiarch_includes $RPM_BUILD_ROOT%{_includedir}/python%{pyver}/ImConfig.h

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root)
%doc pil-handbook.pdf Scripts Images Sane CHANGES* README
%{_libdir}/python%{pyver}/site-packages/PIL.pth
%{_libdir}/python%{pyver}/site-packages/PIL/

%files devel
%defattr (-,root,root)
%{_includedir}/python%{pyver}/Imaging.h
%{_includedir}/python%{pyver}/ImPlatform.h
%{_includedir}/python%{pyver}/ImConfig.h
%multiarch %multiarch_includedir/python%{pyver}/ImConfig.h

%changelog
* Wed Mar  9 2005 Frederic Lepied <flepied@mandrakesoft.com> 1.1.4-9mdk
- install include files in a devel sub package

* Fri Dec 10 2004 Götz Waschk <waschk@linux-mandrake.com> 1.1.4-8mdk
- drop pilray support, this fixes bug 12347

* Sat Dec 04 2004 Michael Scherer <misc@mandrake.org> 1.1.4-7mdk
- Rebuild for new python

* Fri Sep 17 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.1.4-6mdk
- add support for radiance pic format (bug #)

* Sun May 23 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.1.4-5mdk
- grf, fix buildrequires for real

* Fri May 21 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.1.4-4mdk
- fix buildrequires

* Tue Mar  2 2004 Götz Waschk <waschk@linux-mandrake.com> 1.1.4-3mdk
- fix build with new freetype2

* Wed Sep  3 2003 Frederic Lepied <flepied@mandrakesoft.com> 1.1.4-2mdk
- fixed buildrequires for amd64

* Fri Aug 22 2003 Austin Acton <aacton@yorku.ca> 1.1.4-1mdk
- 1.1.4
- drop patch (merged u/s)
- buildrequires libfreetype-devel, tkinter
- use distutils to build and install
- update handbook

* Thu Aug 07 2003 Frederic Lepied <flepied@mandrakesoft.com> 1.1.3-3mdk
- python 2.3

* Fri May  2 2003 Frederic Lepied <flepied@mandrakesoft.com> 1.1.3-2mdk
- rebuild

* Mon Dec 16 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.1.3-1mdk
- let patch in place ( do not replace it by perl commands )
- from Austin Acton <aacton@yorku.ca> :
	- new version
	- update requires and buildrequires and files list

* Wed Dec  4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1.2-5mdk
- Teach it where python home is, and make sure to build static
  libraries with PIC if they can be turned into a DSO

* Wed Jan  2 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.1.2-4mdk
- rebuild for python 2.2

* Wed Jul 18 2001 Stefan van der Eijk <stefan@eijk.nu> 1.1.2-3mdk
- BuildRequires:	XFree86-devel
- Copyright --> License
- Remove BuildRequires:	zlib-devel

* Tue Jul 17 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.1.2-2mdk
- don't provide python2.0 directory

* Fri May 18 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.1.2-1mdk
- 1.1.2

* Wed Mar 28 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.1.1-2mdk
- add _imagingtk.so (#2774).
- added Requires on tkinter.

* Wed Dec  6 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.1.1-1mdk
- 1.1.1

* Tue Sep 19 2000 David BAUDENS <baudens@mandrakesoft.com> 1.1-2mdk
- Fix FredL's typo

* Wed Sep 13 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.1-1mdk
- 1.1

* Thu Mar 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.0b1-3mdk
- group fix.

* Mon Jan 10 2000 Lenny Cartier <lenny@mandrakesoft.com>
- build for oxygen
- deactivate provinding of tkinter lib since Chmouel one's works perfectly

* Mon Dec 27 1999 Lenny Cartier <lenny@mandrakesoft.com>
- new in contribs
- bz2 archive

* Mon Jan 11 1999 Oliver Andrich <oli@andrich.net>
- upgraded to Imaging 1.0b1

* Sun Dec 27 1998 Oliver Andrich <oli@andrich.net>
- changed Setup file so that the tkinter module is compiled with Tix and BLT
  support

* Mon Jul 20 1998 Oliver Andrich <oli@andrich.net>
- had to recompile and update the package to support the uptodate graphics
  libs

* Sat Jun 07 1998 Oliver Andrich <oli@andrich.net>
- updated package to version 0.3a4