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
Version:        0.4.0
Release:        0
Summary:        Library and tools for the WebP graphics format
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            https://developers.google.com/speed/webp/

#Git-Clone:	http://git.chromium.org/webm/libwebp.git
Source:         https://webp.googlecode.com/files/libwebp-0.4.0.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 libwebp5
Summary:        Library for the WebP graphics format
Group:          System/Libraries

%description -n libwebp5
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 libwebpdemux1
Summary:        Library for extraction of data and images from WebP container files
Group:          System/Libraries

%description -n libwebpdemux1
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 libwebpmux1
Summary:        Library for reading/adding data to WebP container files
Group:          System/Libraries

%description -n libwebpmux1
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:       libwebp5 = %version
Requires:       libwebpdemux1 = %version
Requires:       libwebpmux1 = %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 libwebp5 -p /sbin/ldconfig
%postun -n libwebp5 -p /sbin/ldconfig
%post   -n libwebpdemux1 -p /sbin/ldconfig
%postun -n libwebpdemux1 -p /sbin/ldconfig
%post   -n libwebpmux1 -p /sbin/ldconfig
%postun -n libwebpmux1 -p /sbin/ldconfig

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

%files -n libwebp5
%defattr(-,root,root)
%_libdir/libwebp.so.5*

%files -n libwebpdemux1
%defattr(-,root,root)
%_libdir/libwebpdemux.so.1*

%files -n libwebpmux1
%defattr(-,root,root)
%_libdir/libwebpmux.so.1*

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

%changelog