File optipng.spec of Package optipng

#
# spec file for package optipng (Version 0.6.1)
#
# 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:           optipng
BuildRequires:  libpng-devel
License:        zlib/libpng License
Group:          Productivity/Archiving/Compression
Summary:        A PNG File Compressor
Version:        0.6.1
Release:        10.<RELEASE4>
Url:            http://optipng.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %name-%{version}.tar.bz2
Source1:        macros.optipng
Patch0:         optipng-suse-paths.diff
Patch1:         optipng-CVE-2008-5101.patch
Patch2:         optipng-reallocation-security.diff
Patch3:         optipng-use-after-free.diff

%description
OptiPNG is a PNG optimizer that recompresses image files to a smaller
size, without losing any information. This program also converts
external formats (BMP, GIF, PNM; TIFF support is coming up) to
optimized PNG, and performs PNG integrity checks and corrections.



Authors:
--------
    Cosmin Truta cosmin@cs.toronto.edu

%prep
%setup -q
%patch0
%patch1 -p1
%patch2 -p1
%patch3

%build
./configure -with-system-zlib -with-system-libpng
make CFLAGS="$RPM_OPT_FLAGS"

%install
%makeinstall
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/etc/rpm/macros.optipng

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
#%doc FEATURES HISTORY DESIGN TODO CAVEAT
/usr/bin/optipng
/usr/share/man/man1/optipng.1.gz
/etc/rpm/macros.optipng

%changelog
* Thu May 21 2009 pgajdos@suse.cz
- fixed security: optipng potentionally uses deallocated pointer
  [bnc#505103]
  * use-after-free.diff
* Tue Feb 24 2009 pgajdos@suse.cz
- fixed security bug: memory reallocation vulnerability [bnc#479067]
  * reallocation-security.diff
* Tue Dec 02 2008 pgajdos@suse.cz
- fixes [bnc#447453] - optipng bmp buffer overflow
  CVE-2008-5101.patch
* Thu Jul 31 2008 pgajdos@suse.cz
- updated to version 0.6.1:
  * Upgraded cexcept to version 2.0.1.
  + Added a configure script, to be used instead of unix-secure.mak.
  ! Fixed a build issue that occured when using libpng from the system.
  ! Fixed processing when image reduction yields an output larger than
  the original.
  ! Fixed behavior of -preserve.
 - Removed displaying of partial progress when abandoning IDATs under
  the -v option.  The percentages displayed were not very accurate.
* Tue Jun 24 2008 pgajdos@suse.cz
- updated to version 0.6:
  * Implemented grayscale(alpha)-to-palette reductions.
  * Improved conversion of bKGD info during RGB-to-palette reductions.
  * Fixed conversion of bKGD and tRNS during 16-to-8-bit reductions.
  * Added support for compressed BMP (incl. PNG-compressed BMP)
  * Improved the speed of reading raw PNM files.
  * Recognized PNG digital signatures (dSIG) and disabled optimization
  in their presence, to preserve their integrity.
  * Allowed the user to enforce the optimization of dSIG'ed files.
  * Recognized APNG animation files and disabled reductions to preserve
  their integrity.
  * Added the -snip option, to allow the user to "snip" one image out of
  a multi-image file, such as animated GIF, multi-page TIFF, or APNG.
  * Improved recovery of PNG files with incomplete IDAT.
  * Fixed a crash triggered by the use of -log on some platforms.
  * Fixed behavior of -out and -dir when the input is already optimized.
  * Provided more detailed image information at the start of processing.
  * Provided a more detailed summary at the end of processing, under the
  presence of the -v option and/or the occurence of exceptional events.
- added optipng-0.6.0.1.diff from upstream (building with system libs)
* Mon Sep 10 2007 pgajdos@suse.cz
- package provides %%optipng macro [#309087]
- removed DESTDIR=$RPM_BUILD_ROOT from %%build phase
* Thu Feb 01 2007 dmueller@suse.de
- update to 0.5.5:
  * Used a previously-missed RGB-to-palette reduction opportunity
  * Fixed conversion of bKGD info during rgb-to-palette reductions.
  * Fixed pre-computation of iterations.
  * Fixed behavior of -out and -dir when changing interlacing.
* Sat Dec 02 2006 dmueller@suse.de
- add upstream patch to fix handling of true-color RGB images
* Thu Nov 09 2006 dmueller@suse.de
- Initial package (0.5.4)
openSUSE Build Service is sponsored by