File lcms.spec of Package lcms

#
# spec file for package lcms (Version 1.17)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           lcms
BuildRequires:  gcc-c++ libtiff-devel python-devel swig
License:        X11/MIT
Group:          Productivity/Graphics/Other
Summary:        Utilities for the Little CMS Engine
Url:            http://www.littlecms.com/
Version:        1.17
Release:        44.<RELEASE59>
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}.tar.bz2
Patch:          lcms-endian.patch
Patch1:         lcms-strict-aliasing.patch
Patch2:         lcms-implicit-declaration.patch
# PATCH-FIX-UPSTREAM lcms-bnc479606.patch bnc479606 lcms-1.18 sbrabec@suse.cz -- Fix several vulnerabilities.
Patch3:         lcms-bnc479606.patch
# PATCH-FIX-UPSTREAM lcms-bnc479606-2.patch bnc479606 lcms-1.18(?) sbrabec@suse.cz -- Hardened checks (by Chris Evans).
Patch4:         lcms-bnc479606-2.patch
# Package name for <= 10.3 and <=SLE10:
Provides:       liblcms = %{version}
Obsoletes:      liblcms <= 1.16

%description
Little cms is a small speed optimized color management engine.



Authors:
--------
    Marti Maria <info@littlecms.com>

%package -n liblcms1
License:        X11/MIT
Summary:        Libraries for the Little CMS Engine
Group:          System/Libraries
#workaround for wrong package naming
Provides:       liblcms0 = %{version}
Obsoletes:      liblcms0 <= %{version}
Requires:       %{name} = %{version}

%description -n liblcms1
Little cms is a small speed optimized color management engine.



Authors:
--------
    Marti Maria <info@littlecms.com>

%package -n liblcms-devel
License:        X11/MIT
Summary:        Include Files and Libraries Mandatory for Development
Requires:       liblcms1 = %{version} glibc-devel
Group:          Development/Libraries/C and C++

%description -n liblcms-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Marti Maria <info@littlecms.com>

%package -n python-lcms
License:        X11/MIT
Summary:        Python Bindings for the Little CMS Engine
Group:          Development/Libraries/Python
%py_requires

%description -n python-lcms
Little cms is a small speed optimized color management engine.



Authors:
--------
    Marti Maria <info@littlecms.com>

%prep
%setup -q
%patch
%patch1
%patch2
%patch3 -p1
%patch4 -p1
cp -a README.1ST README
chmod -x COPYING AUTHORS NEWS README doc/*.TXT

%build
autoreconf -f -i
cd python
./swig_lcms
cd ..
%configure\
	--disable-static\
	--with-python
make %{?jobs:-j%jobs}

%check
make %{?jobs:-j%jobs} check
#make utils

%install
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{py_sitedir}/_lcms.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n liblcms1 -p /sbin/ldconfig

%postun -n liblcms1 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING AUTHORS NEWS README
%{_bindir}/*
%{_mandir}/man?/*.*

%files -n liblcms1
%defattr(-,root,root)
%{_libdir}/liblcms.so.1*

%files -n liblcms-devel
%defattr(-,root,root)
%doc doc/*.TXT
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%files -n python-lcms
%defattr(-,root,root,-)
%{py_sitedir}/lcms.py*
%{py_sitedir}/_lcms.so

%changelog
* Fri Mar 06 2009 sbrabec@suse.cz
- Fixed several integer overflows a memory leaks (bnc#479606,
  oCERT-2009-003, CVE-2009-0581, CVE-2009-0723, CVE-2009-0581,
  CVE-2009-0733).
* Tue Jul 01 2008 sbrabec@suse.cz
- Enabled python-lcms bindings (bnc#371592).
* Tue Jun 03 2008 coolo@suse.de
- require COPYING package
* Sun May 11 2008 coolo@suse.de
- fix renames of xxbit packages
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Wed Dec 26 2007 crrodriguez@suse.de
- fix E: shlib-policy-name-error (Badness: 10000) liblcms1
- disable static libraries and remove libtool archives
* Mon Nov 05 2007 sbrabec@suse.cz
- Provide and obsolete old package name.
- gcc warning fixes.
* Thu Nov 01 2007 sbrabec@suse.cz
- Updated to version 1.17 (#276528):
  * Changes in API:
  * several functions wrapped
  * cmsSetLanguage parameters changed to match ICC spec
  * removed support for extended gamut descriptor
  * cmsFLAGS_NODEFAULTRESOURCEDEF moved to 0x01000000
  * All errors moved to fatal
  * Vulnerability fixes
  * Improved robustness against ill-formed profiles
- Source and tools package renamed to lcms.
- Package split according to library packaging rules.
* Tue Feb 06 2007 ltinkl@suse.cz
- version 1.16
  * Improved stability.
  * Faster
  * Two different types of black preservation on CMYK-> CMYK transforms
  * Ability to set adaptation state of observer on absolute colorimetric transforms.
  * Actually it only allows No adaptation (d=0) and observer fully adapted (d=1)
  * lcms can now "fix" some broken 8-bit profiles that have gray axes misplaced.
  * icctrans can now read and write CGATS/IT8 files.
  * improved tifficc with tiff Lab8 support
  * icclink now supports colorant table tag.
  * pthread support
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 16 2005 ltinkl@suse.cz
- update to 1.15
* Wed Jan 05 2005 adrian@suse.de
- update to version 1.14
- add c++ packages to nfb, libtiff does use c++ now.
* Sun Dec 21 2003 adrian@suse.de
- update to version 1.12
* Mon Oct 27 2003 ro@suse.de
- update to 1.11
* Sat Jul 19 2003 adrian@suse.de
- update to version 1.10
* Fri Feb 21 2003 ro@suse.de
- added provides liblcms.so to devel package (compat reasons)
* Thu Dec 19 2002 coolo@suse.de
- fixing soname of the library
* Thu Dec 19 2002 kukuk@suse.de
- Fix requires of main package in devel subpackage (add version)
* Wed Dec 18 2002 adrian@suse.de
- split -devel package
* Tue Aug 06 2002 adrian@suse.de
- add %%run_ldconfig
* Wed Jul 10 2002 adrian@suse.de
- update to version 1.09:
  Overall faster speed.
  Much better absolute colorimetric intents. LittleCMS does now 'undo'
  chromatic adaptation as recommended by latest ICC spec.
  Full softproofing.
  Full gamutchecking.
  Writting capabilities. Lcms can now create profiles as well.
  New CIE94, CMC and BFD color difference spaces.
  Low-level LUT handling is now promoted to API and documented.
  Parametric curves.
  Several ICC 4.0 extensions. Full ICC 4.0 compliance is expected on next
  revision.
  Improved WhiteBlack compensation
  Improved portability. Several new platforms added.
  New JPEGICC utility.
  Improved TIFFICC and ICCTRANS utilities.
  Some minor bugs fixed.
- The "some minor bug fixes" obsolete the big qt namespace fix.
* Mon Jun 24 2002 adrian@suse.de
- fix HANDLE statement in lcms.h for Qt3
* Fri Jun 21 2002 ro@suse.de
- use -fPIC for shared lib
- autodetect alpha
- autodetect bigendian
* Tue Jan 29 2002 adrian@suse.de
- update to version 1.08
- header files are moving from /usr/include/lcms to /usr/include
* Wed Jan 23 2002 coolo@suse.de
- add a soname to the library
* Fri Jan 11 2002 schwab@suse.de
- Make portable across architectures.
* Mon Jan 07 2002 adrian@suse.de
- use build root
- use %%{_libdir}
* Sun Nov 25 2001 adrian@suse.de
- add mips to big endian architectures
* Thu Oct 25 2001 ro@suse.de
- use mieee to make it build on alpha
* Mon Jul 16 2001 adrian@suse.de
- compile with -fPIC (fixed by kraxel)
* Fri Jun 15 2001 adrian@suse.de
- add s390x to big_endian
* Sun Mar 25 2001 adrian@suse.de
- update to 1.07. no libtool support anymore in the package :-(
* Wed Feb 28 2001 ro@suse.de
- don't talk about long if a 32bit type is desired ...
* Fri Feb 09 2001 bk@suse.de
- configure fixed to proper use of RPM_OPT_FLAGS
- fixed filelist (remove obsolete %%docdirs that are in aaa_base)
- move update_config macro to %%prep, before patches(is preparing)
* Wed Nov 29 2000 adrian@suse.de
- comment out PACKAGE and VERSION in lcms.h. this had break every
  configure test.
* Wed Oct 04 2000 adrian@suse.de
- Spec file created from lcms-1.06.tar.bz2 by autospec
openSUSE Build Service is sponsored by