70025e
%global _hardened_build 1
70025e
Name:		libwebp
70025e
Version:	0.3.0
70025e
Release:	7%{?dist}
70025e
Group:		Development/Libraries
70025e
URL:		http://webmproject.org/
70025e
Summary:	Library and tools for the WebP graphics format
70025e
# Additional IPR is licensed as well. See PATENTS file for details
70025e
License:	BSD
70025e
Source0:	http://webp.googlecode.com/files/%{name}-%{version}.tar.gz
70025e
Source1:	libwebp_jni_example.java	
70025e
Patch0:		libwebp-0.3.0-endian-check.patch
70025e
Patch1:		libwebp-0.3.0-endian-check2.patch
70025e
BuildRequires:	libjpeg-devel libpng-devel libtool swig 
70025e
BuildRequires:  giflib-devel
70025e
BuildRequires:  libtiff-devel
70025e
BuildRequires:	java-devel
70025e
BuildRequires:	jpackage-utils
70025e
70025e
%description
70025e
WebP is an image format that does lossy compression of digital
70025e
photographic images. WebP consists of a codec based on VP8, and a
70025e
container based on RIFF. Webmasters, web developers and browser
70025e
developers can use WebP to compress, archive and distribute digital
70025e
images more efficiently.
70025e
70025e
%package tools
70025e
Group:		Development/Tools
70025e
Summary:	The WebP command line tools
70025e
Requires:	%{name}%{?_isa} = %{version}-%{release}
70025e
70025e
%description tools
70025e
WebP is an image format that does lossy compression of digital
70025e
photographic images. WebP consists of a codec based on VP8, and a
70025e
container based on RIFF. Webmasters, web developers and browser
70025e
developers can use WebP to compress, archive and distribute digital
70025e
images more efficiently.
70025e
70025e
%package devel
70025e
Group:		Development/Libraries
70025e
Summary:	Development files for libwebp, a library for the WebP format
70025e
Requires:	%{name}%{?_isa} = %{version}-%{release}
70025e
70025e
%description devel
70025e
WebP is an image format that does lossy compression of digital
70025e
photographic images. WebP consists of a codec based on VP8, and a
70025e
container based on RIFF. Webmasters, web developers and browser
70025e
developers can use WebP to compress, archive and distribute digital
70025e
images more efficiently.
70025e
70025e
%package java
70025e
Group:		Development/Libraries
70025e
Summary:	Java bindings for libwebp, a library for the WebP format
70025e
Requires:	%{name}%{?_isa} = %{version}-%{release}
70025e
Requires:	java
70025e
Requires:	jpackage-utils
70025e
70025e
%description java
70025e
Java bindings for libwebp.
70025e
70025e
%prep
70025e
%setup -q
70025e
%patch0 -p1 -b .endian
70025e
%patch1 -p1 -b .endian2
70025e
70025e
%build
70025e
mkdir -p m4
70025e
./autogen.sh
70025e
# enable libwebpmux since gif2webp depends on it
70025e
%configure --disable-static --enable-libwebpmux
70025e
make %{?_smp_mflags}
70025e
70025e
# swig generated Java bindings
70025e
cp %{SOURCE1} .
70025e
cd swig
70025e
rm -rf libwebp.jar libwebp_java_wrap.c
70025e
mkdir -p java/com/google/webp
70025e
swig -ignoremissing -I../src -java \
70025e
	-package com.google.webp  \
70025e
	-outdir java/com/google/webp \
70025e
	-o libwebp_java_wrap.c libwebp.i
70025e
70025e
gcc %{optflags} -shared \
70025e
	-I/usr/lib/jvm/java/include \
70025e
	-I/usr/lib/jvm/java/include/linux \
70025e
	-I../src \
70025e
	-L../src/.libs -lwebp libwebp_java_wrap.c \
70025e
	-o libwebp_jni.so
70025e
70025e
cd java
70025e
javac com/google/webp/libwebp.java
70025e
jar cvf ../libwebp.jar com/google/webp/*.class
70025e
70025e
%install
70025e
%make_install
70025e
find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete
70025e
70025e
# swig generated Java bindings
70025e
mkdir -p %{buildroot}/%{_libdir}/%{name}-java
70025e
cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
70025e
70025e
%post -n %{name} -p /sbin/ldconfig
70025e
70025e
%postun -n %{name} -p /sbin/ldconfig
70025e
70025e
%files tools
70025e
%{_bindir}/cwebp
70025e
%{_bindir}/dwebp
70025e
%{_bindir}/gif2webp
70025e
%{_bindir}/webpmux
70025e
%{_mandir}/man*/*
70025e
70025e
%files -n %{name}
70025e
%doc README PATENTS COPYING NEWS AUTHORS
70025e
%{_libdir}/%{name}*.so.*
70025e
70025e
%files devel
70025e
%{_libdir}/%{name}*.so
70025e
%{_includedir}/*
70025e
%{_libdir}/pkgconfig/*
70025e
70025e
%files java
70025e
%doc libwebp_jni_example.java
70025e
%{_libdir}/%{name}-java/
70025e
70025e
%changelog
70025e
* Tue Feb 21 2017 Martin Stransky <stransky@redhat.com> - 0.3.0-7
70025e
- Added libwebp dependency to libwebp-tools
70025e
70025e
* Tue Feb 21 2017 Martin Stransky <stransky@redhat.com> - 0.3.0-6
70025e
- Rebuilt
70025e
70025e
* Mon Oct 13 2014 Jaromir Capik <jcapik@redhat.com> - 0.3.0-5
70025e
- Removing __PPC__ macro conflicting with __BYTE_ORDER__ endian check (#1127230)
70025e
- Resolves: rhbz#1127230
70025e
70025e
* Mon Aug 18 2014 Peter Robinson <pbrobinson@redhat.com> 0.3.0-4
70025e
- Fix ppc64le build
70025e
70025e
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.3.0-3
70025e
- Mass rebuild 2014-01-24
70025e
70025e
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.3.0-2
70025e
- Mass rebuild 2013-12-27
70025e
70025e
* Mon May 13 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 0.3.0-1
70025e
- upstream release 0.3.0
70025e
- enable gif2webp
70025e
- add build requires on giflib-devel and libtiff-devel
70025e
- use make_install and hardened macros
70025e
- list binaries explicitly
70025e
70025e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-3
70025e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
70025e
70025e
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 0.2.1-2
70025e
- rebuild due to "jpeg8-ABI" feature drop
70025e
70025e
* Thu Dec 27 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.2.1-1
70025e
- new upstream release 0.2.1
70025e
70025e
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 0.1.3-3
70025e
- rebuild against new libjpeg
70025e
70025e
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2
70025e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
70025e
70025e
* Thu Feb 02 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.3-1
70025e
- Several spec improvements by Scott Tsai <scottt.tw@gmail.com>
70025e
70025e
* Wed May 25 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.2-1
70025e
- Initial spec. Based on openSUSE one
70025e