File python-imaging.spec of Package python-imaging
#
# spec file for package python-imaging (Version 1.1.6)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: python-imaging
BuildRequires: freetype2-devel giflib-devel libgphoto2-devel libpng-devel libtiff-devel netpbm python-devel python-tk sane tix tk-devel xorg-x11-devel
Url: http://www.pythonware.com/products/pil/index.htm
%define pyver %(python -c 'import sys; print sys.version[:3]')
Version: 1.1.6
Release: 168
License: Python Copyright; X11/MIT
Group: Development/Libraries/Python
Provides: _imaging.so _imagingtk.so python_imaging_lib pyimglib
Requires: python >= %pyver, python < %{pyver}.99
Requires: python-tk tk tix blt
Obsoletes: pyimglib
AutoReqProv: on
Summary: The Python Imaging Library - PIL
Source: Imaging-%{version}.tar.bz2
Source1: pil-handbook.pdf
Patch1: Imaging-1.1.5-test.patch
Patch2: Imaging-1.1.5-64bit.patch
Patch3: Imaging-1.1.6-ssize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Python Imaging Library adds fairly powerful image processing
capabilities to the Python interpreter and provides extensive file
format support, and efficient internal representation.
Authors:
--------
image-sig@python.org
%package sane
License: Python Copyright; X11/MIT
Provides: python_imaging_sane
Summary: Python SANE module
Group: Development/Libraries/Python
AutoReqProv: on
%description sane
The SANE module provides an interface to the SANE scanner and frame
grabber interface for Linux. It is a part of the Python Imaging
Library.
Authors:
--------
Andrew Kuchling
Ralph Heinkel <rheinkel@email.de>
%prep
%setup -n Imaging-%{version}
%patch1
%patch2
%patch3
cp %{S:1} .
%build
#
# Change python files header
for f in `find . -type f -exec grep -l /usr/local/bin/python \{\} \;` ; do
rm -f tmp
sed -e "s:^#!.*/usr/local/bin/python:#!/usr/bin/env python:g" $f > tmp
cp -f tmp $f
done
#
# Build sane lib
cd Sane
python setup.py build
cd ..
#
# Build python things
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
python setup.py build_ext -i
python selftest.py
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
install -d -m 755 $RPM_BUILD_ROOT/usr/include/python%pyver
install -m 644 libImaging/Imaging.h \
libImaging/ImPlatform.h \
$RPM_BUILD_ROOT/usr/include/python%pyver
cd Sane
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=../INSTALLED_FILES_SANE
#cat INSTALLED_FILES >> ../INSTALLED_FILES
cd ..
%clean
rm -rf ${RPM_BUILD_ROOT}
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc CHANGES README Docs Scripts Images pil-handbook.pdf
/usr/include/python%pyver/*
%files sane -f INSTALLED_FILES_SANE
%defattr(-,root,root)
%doc Sane/sanedoc.txt Sane/README Sane/CHANGES
%changelog
* Tue Jun 03 2008 crrodriguez@suse.de
- needs fno-strict-aliasing
* Thu Mar 29 2007 matejcik@suse.cz
- update to 1.1.6
- threading support for sane module
- NumPy array interface support
- converter to QImage
- new ImageMath module
- bugfixes
* Mon Oct 23 2006 meissner@suse.de
- buildrequires libgphoto2-devel
* Fri Oct 20 2006 jmatejek@suse.cz
- fixed minor 64bit PEP353 related problems
* Thu Apr 20 2006 jmatejek@suse.cz
- fixed dependency resolving on 64bit platforms
* Thu Apr 20 2006 jmatejek@suse.cz
- selftest now breaks build process
* Tue Feb 28 2006 jmatejek@suse.cz
- updated to reflect python changes due to #149809
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 23 2005 matejcik@suse.cz
- branched off -sane package
* Wed Dec 21 2005 jmatejek@suse.cz
- fixed bad use of realloc()
* Fri Oct 07 2005 matejcik@suse.cz
- updated to 1.1.5
- further cleanup of build process
- removed ImConfig.h, as it is no longer provided
- cleaned up specfile
* Fri Apr 16 2004 mcihar@suse.cz
- -fno-strict-aliasing
* Tue Jan 06 2004 mcihar@suse.cz
- fix permissions for directory
- add %%clean
* Tue Jan 06 2004 mcihar@suse.cz
- fix build with current freetype
- no root for build
* Mon Aug 11 2003 mcihar@suse.cz
- include headers
* Sat Jul 26 2003 kukuk@suse.de
- Add tk-devel to neededforbuild
* Mon Jun 16 2003 mcihar@suse.cz
- use --record-rpm instead of --record
* Thu May 29 2003 mcihar@suse.cz
- added libdir for linking with sane
* Tue May 27 2003 mcihar@suse.cz
- update to 1.1.4:
Version 1.1.4 adds improved build scripts, truetype/opentype font
support, memory mapping support also for non-Windows platforms,
screen and clipboard grabbing on Windows, support for CSS-style
color strings, support for IPTC/NAA and EXIF metadata, and more.
- built sane and freetype module
- using distutils for build
- cleaned up spec file
* Tue May 13 2003 mcihar@suse.cz
- use %%defattr
* Mon May 12 2003 mcihar@suse.cz
- use versioned dependency on python
* Thu Mar 06 2003 kukuk@suse.de
- Remove conflict to python-tkinter [Bug #24784]
* Tue Mar 04 2003 mcihar@suse.cz
- included needed _imagingtk.so in package
* Wed Nov 06 2002 mcihar@suse.cz
- no more tkinter included in this:
Starting with 1.0 final (release candidate 2 and later, to be precise),
PIL can attach itself to Tkinter in flight. As a result, you no longer
need to rebuild the Tkinter extension to be able to use PIL.
* Mon Aug 12 2002 vinil@suse.cz
- new version: 1.1.3
- Fixed build for Tcl/Tk 8.4
* Fri Jul 26 2002 adrian@suse.de
- fix neededforbuild
* Fri Jul 12 2002 max@suse.de
- Fixed build for Tcl/Tk 8.4
* Tue Jun 04 2002 ro@suse.de
- fix build for lib64 platforms
- use -fPIC for compiling libImaging
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Wed Jan 09 2002 rvasice@suse.cz
- replaced old Tkinter to compile with python 2.2
* Tue Aug 28 2001 rvasice@suse.cz
- update to version 1.1.2
- adapted for python 2.1 - regex module -> re
- fixed broken "show" method, TIFF "save" bug
- added transparency support to the PNG codec
* Wed Dec 06 2000 mt@suse.de
- cleaned up tk dependencies
* Thu Nov 30 2000 ro@suse.de
- tix link fixed
* Wed Nov 29 2000 ro@suse.de
- changed neededforbuild <tcld> to <tcl-devel>
* Mon Nov 27 2000 mt@suse.de
- replaced old thinter with new Tkinter-2.0-8.0.tar.gz
* Mon Nov 20 2000 mt@suse.de
- changed spec to be independed of python version
* Sat Oct 28 2000 kukuk@suse.de
- Add python-devel to need for build
* Wed Jun 21 2000 mt@suse.de
- updated to pil v1.1
* Tue Jun 20 2000 mt@suse.de
- added PIL.pth to the file list
* Wed Jun 07 2000 ro@suse.de
- fixed to compile with tcl/tk 8.3
* Mon Dec 06 1999 mt@suse.de
- added includes to the package (bugzilla #1490)
* Fri Nov 05 1999 max@suse.de
- changed dependencies from tk_new and tix_new to tk and tix.
* Mon Oct 11 1999 max@suse.de
- ready for the new Tcl/Tk packages
* Mon Sep 20 1999 ro@suse.de
- added provides python_image_lib
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Thu May 27 1999 ro@suse.de
- added blt and libpng to neededforbuild
* Wed May 26 1999 mt@suse.de
- created package