Summary: Python's own image processing library Name: python-imaging Version: 1.1.7 Release: %mkrel 7 License: MIT Group: Development/Python URL: http://www.pythonware.com/products/pil/ Source0: http://effbot.org/downloads/Imaging-%{version}.tar.gz Source1: pil-handbook.pdf.bz2 Source2: linux-python-paint-icon.gif Patch0: Imaging-1.1.7-link.patch # (ahmad) add patch to fix sane types (Fedora) Patch1: python-imaging-1.1.6-sane-types.patch # (ahmad) add patch to retain gif transperancy (Fedora) Patch2: python-imaging-giftrans.patch # (philippem) buffer overflow patch, bz 703212 (Fedora) Patch3: %{name}-buffer.patch BuildRequires: python-devel BuildRequires: jpeg-devel BuildRequires: png-devel BuildRequires: freetype2-devel BuildRequires: lcms-devel BuildRequires: libsane-devel BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: zlib-devel BuildRequires: tkinter BuildRequires: libjpeg-devel %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} Requires: libjpeg-devel zlib-devel python-devel %description devel Header files for the Python Imaging Library version %{version}. %prep %setup -q -n Imaging-%{version} %apply_patches bzcat %SOURCE1 > pil-handbook.pdf # fix shebang find . -type f | xargs perl -pi -e 's@/usr/local/bin/python@/usr/bin/python@' find . -type f | xargs perl -pi -e 's@/usr/bin/env python@/usr/bin/python@' # make the scripts executable: chmod 0755 Scripts/*.py %build CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" python setup.py build cd Sane CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" python setup.py build %install rm -fr %{buildroot} python setup.py install --skip-build --root=%{buildroot} cd libImaging mkdir -p %{buildroot}%{_includedir}/python%{pyver}/ install -m 644 ImPlatform.h Imaging.h %{buildroot}%{_includedir}/python%{pyver}/ cd .. cd Sane python setup.py install --skip-build --root=%{buildroot} cd .. %check # (ahmad) add some hacks from Fedora to enable running the check sed -i "s|ROOT = \".\"|ROOT = \"%{buildroot}%{python_sitearch}\"|" selftest.py ln -s $PWD/Images %{buildroot}%{python_sitearch}/Images python selftest.py rm %{buildroot}%{python_sitearch}/Images %clean rm -rf %{buildroot} %files %defattr (-,root,root) %doc pil-handbook.pdf Scripts Images CHANGES* README %{_bindir}/pil*.py %py_platsitedir/PIL.pth %dir %py_platsitedir/PIL %py_platsitedir/PIL/*.egg-info %py_platsitedir/PIL/*.py* %py_platsitedir/PIL/_imaging.so %py_platsitedir/PIL/_imagingcms.so %py_platsitedir/PIL/_imagingft.so %py_platsitedir/PIL/_imagingmath.so %py_platsitedir/PIL/_imagingtk.so %py_platsitedir/_sane.so %py_platsitedir/*.egg-info %py_platsitedir/sane.py* %files devel %defattr (-,root,root) %{_includedir}/python%{pyver}/Imaging.h %{_includedir}/python%{pyver}/ImPlatform.h %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.1.7-7.mga3 + Revision: 378980 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Dec 01 2012 philippem <philippem> 1.1.7-6.mga3 + Revision: 324075 - add buildrequire libjpeg-devel - buffer overflow patch, bz 703212 (Fedora) - Build with -fno-strict-aliasing option * Sat Jul 02 2011 fwang <fwang> 1.1.7-5.mga2 + Revision: 117414 - rebuild for new tcl * Mon Feb 21 2011 ahmad <ahmad> 1.1.7-4.mga1 + Revision: 55600 - rebuild to make all pythonegg requires/provides lowercase * Wed Feb 02 2011 ahmad <ahmad> 1.1.7-3.mga1 + Revision: 46310 - add patch to fix sane types (Fedora) - add patch to fix gif transperancy (Fedora) - add Requires libjpeg-devel zlib-devel python-devel to the -devel sub-package (Fedora) - fix some more shebang (and move all the shebang fixes from %%install to %%build) - make the Scripts/*.py executable (Fedora) - build with 'python setup.py build' - install with --skip-build - add a %%check stage (some hacks added from Fedora so that the check can run) - imported package python-imaging