File libwebp.spec of Package libwebp

#
# spec file for package libwebp
#
# Copyright (c) 2013 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/
#


Name:           libwebp
%define lname	libwebp4
Version:        0.3.1
Release:        1.1
Url:            https://developers.google.com/speed/webp/
Summary:        Library and tools for the WebP graphics format
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++

#Git-Clone:	http://git.chromium.org/webm/libwebp.git
#DL-URL:	https://webp.googlecode.com/files/libwebp-0.3.1.tar.gz
Source:         https://webp.googlecode.com/files/%name-%version.tar.gz
Source2:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  giflib-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  pkgconfig

%description
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package tools
Summary:        The WebP command line tools
Group:          Productivity/Archiving/Compression
#O/P added in 12.2
Obsoletes:      webp-tools < %version-%release
Provides:       webp-tools = %version-%release

%description tools
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package -n libwebp4
Summary:        Library for the WebP graphics format
Group:          System/Libraries

%description -n libwebp4
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%package -n libwebpdemux0
Summary:        Library for extraction of data and images from WebP container files
Group:          System/Libraries

%description -n libwebpdemux0
The WebP Demux API enables extraction of images and extended format
data from WebP files. This API currently supports reading of XMP/EXIF
metadata, ICC profile and animated images.

%package -n libwebpmux0
Summary:        Library for reading/adding data to WebP container files
Group:          System/Libraries

%description -n libwebpmux0
The WebP Mux API contains methods for adding data to and reading data
from WebP files. This API currently supports XMP/EXIF metadata, ICC
profile and animation.

%package devel
Summary:        Development files for libwebp, a library for the WebP format
Group:          Development/Libraries/C and C++
Requires:       libwebp4 = %version
Requires:       libwebpdemux0 = %version
Requires:       libwebpmux0 = %version

%description devel
WebP is an image format that does lossy compression of digital
photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.

%prep
%setup -q

%build
%configure --disable-static --enable-libwebpmux --enable-libwebpdemux
make %{?_smp_mflags}

%install
b="%buildroot";
make install DESTDIR="$b";
rm -f "$b/%_libdir"/*.la;

%post   -n libwebp4 -p /sbin/ldconfig
%postun -n libwebp4 -p /sbin/ldconfig
%post   -n libwebpdemux0 -p /sbin/ldconfig
%postun -n libwebpdemux0 -p /sbin/ldconfig
%post   -n libwebpmux0 -p /sbin/ldconfig
%postun -n libwebpmux0 -p /sbin/ldconfig

%files -n libwebp-tools
%defattr(-,root,root)
%_bindir/*
%_mandir/man*/*

%files -n libwebp4
%defattr(-,root,root)
%_libdir/libwebp.so.4*

%files -n libwebpdemux0
%defattr(-,root,root)
%_libdir/libwebpdemux.so.0*

%files -n libwebpmux0
%defattr(-,root,root)
%_libdir/libwebpmux.so.0*

%files devel
%defattr(-,root,root)
%_libdir/libwebp*.so
%_includedir/webp/
%_libdir/pkgconfig/libwebp*.pc

%changelog
* Wed Jun 26 2013 jengelh@inai.de
- Update to new upstream release 0.3.1
  * Add incremental decoding support for images containing
  ALPH and ICCP chunks.
- Enable libwebpmux, libwebpdemux
* Tue Apr 16 2013 jengelh@inai.de
- Update to new upstream release 0.3.0
  * WebPINewRGB/WebPINewYUVA accept being passed a NULL output buffer
  and will perform auto-allocation.
  * Default filter option is now "-strong -f 60"
  * Encoding speed-up for lossy methods 3 to 6
  * Alpha encoding can be done in parallel to lossy using
  `cwebp -mt ...`
  * Color profile, metadata (XMP/EXIF) and animation support in the
  container was finalized.
  * Various NEON assembly additions
- Tool updates / additions:
  * gif2webp added
  * vwebp given color profile & animation support
  * cwebp can preserve color profile / metadata with "-metadata"
* Sun Dec  9 2012 mailaender@opensuse.org
- Update to version 0.2.1
  * libwebp: validate chunk size in ParseOptionalChunks
  * cwebp (windows): fix alpha image import on XP
  * autoconf/libwebp: enable dll builds for mingw
  * [cd]webp: always output windows errors
  * fix double to float conversion warning
  * cwebp: fix jpg encodes on XP
  * VP8LAllocateHistogramSet: fix overflow in size calculation
  * GetHistoBits: fix integer overflow
  * EncodeImageInternal: fix uninitialized free
  * fix the -g/O3 discrepancy for 32bit compile
  * fix the BITS=8 case
  * Make *InitSSE2() functions be empty on non-SSE2 platform
  * make *InitSSE2() functions be empty on non-SSE2 platform
  * make VP8DspInitNEON() public
* Fri Aug 31 2012 dimstar@opensuse.org
- Update to version 0.2.0:
  * Add support for ARGB -> YUVA conversion for lossless decoder
  * Add stats for lossless and alpha encoding
  * Security related hardening: allocation and size checks
  * Add PAM output support to dwebp
  * Alpha channel encode/decode support
  * Lossless encoder/decoder
  * Add TIFF input support to cwebp
  * Incompatible changes:
  - The encode ABI has been modified to support alpha encoding
  - Deprecated function WebPINew() has been removed
  - Decode function signatures have changed to consistently use
    size_t over int/uint32_t
  - decode_vp8.h is no longer installed system-wide
  - cwebp will encode the alpha channel if present.
  * Add libtiff-devel BuildRequires for the new tiff input support.
  * Rename libwebp2 subpackage to libwebp4 (by changing lname
  defines), following upstreams soname bump (incl. baselibs.conf).
  * No reason to run autogen
* Mon Jan 30 2012 jengelh@medozas.de
- Rename webp-tools to libwebp-tools to follow scheme of other
  lib*-tools packages.
* Wed Nov 23 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Mon Oct 31 2011 pgajdos@suse.com
- update to 0.1.3:
  * Advanced decoding APIs.
  * On-the-fly cropping and rescaling of images.
  * SSE2 instructions for decoding performance optimizations on x86 based platforms.
  * Support Multi-threaded decoding.
  * 40%% improvement in Decoding performance.
  * Add support for RGB565, RGBA4444 & ARGB image colorspace.
  * Better handling of large picture encoding.
* Fri Sep 16 2011 coolo@suse.com
- add baselibs.conf and use original tar
* Sat Aug  6 2011 jengelh@medozas.de
- Rename subpackage libwebp-tools to webp-tools to get out of
  rpmlint's pedant observation that it does not contain libraries.
openSUSE Build Service is sponsored by