%global _hardened_build 1 %global realname libwebp %bcond_with java Name: compat-libwebp5 Version: 0.4.2 Release: 1%{?dist} Group: Development/Libraries URL: http://webmproject.org/ Summary: Library and tools for the WebP graphics format # Additional IPR is licensed as well. See PATENTS file for details License: BSD Source0: http://downloads.webmproject.org/releases/webp/%{realname}-%{version}.tar.gz Source1: libwebp_jni_example.java BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: giflib-devel BuildRequires: libtiff-devel %if %{with java} BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: swig %endif BuildRequires: autoconf automake libtool %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 Group: Development/Tools Summary: The WebP command line tools %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 devel Group: Development/Libraries Summary: Development files for libwebp, a library for the WebP format Requires: %{name}%{?_isa} = %{version}-%{release} %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. %if %{with java} %package java Group: Development/Libraries Summary: Java bindings for libwebp, a library for the WebP format Requires: %{name}%{?_isa} = %{version}-%{release} Requires: java-headless Requires: jpackage-utils %description java Java bindings for libwebp. %endif %prep %setup -q -n %{realname}-%{version} %build autoreconf -vif %ifarch aarch64 export CFLAGS="%{optflags} -frename-registers" %endif #export LDFLAGS="$LDFLAGS -fPIC" %configure --disable-static --enable-libwebpmux \ --enable-libwebpdemux --enable-libwebpdecoder make %{?_smp_mflags} %if %{with java} # swig generated Java bindings cp %{SOURCE1} . cd swig rm -rf libwebp.jar libwebp_java_wrap.c mkdir -p java/com/google/webp swig -ignoremissing -I../src -java \ -package com.google.webp \ -outdir java/com/google/webp \ -o libwebp_java_wrap.c libwebp.swig gcc %{optflags} -shared \ -I/usr/lib/jvm/java/include \ -I/usr/lib/jvm/java/include/linux \ -I../src \ -L../src/.libs -lwebp libwebp_java_wrap.c \ -o libwebp_jni.so cd java javac com/google/webp/libwebp.java jar cvf ../libwebp.jar com/google/webp/*.class %endif %install %make_install find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete %if %{with java} # swig generated Java bindings mkdir -p %{buildroot}/%{_libdir}/%{realname}-java cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{realname}-java/ %endif %post -n %{name} -p /sbin/ldconfig %postun -n %{name} -p /sbin/ldconfig %files tools %{_bindir}/cwebp %{_bindir}/dwebp %{_bindir}/gif2webp %{_bindir}/webpmux %{_mandir}/man*/* %files -n %{name} %doc README PATENTS COPYING NEWS AUTHORS %{_libdir}/%{realname}*.so.* %files devel %{_libdir}/%{realname}*.so %{_includedir}/* %{_libdir}/pkgconfig/* %if %{with java} %files java %doc libwebp_jni_example.java %{_libdir}/%{realname}-java/ %endif %changelog * Fri Oct 17 2014 Sandro Mani - 0.4.2-1 - upstream release 0.4.2 * Sun Aug 17 2014 Fedora Release Engineering - 0.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Wed Aug 13 2014 Peter Robinson 0.4.1-2 - Use frename-registers cflag to fix FTBFS on aarch64 * Tue Aug 05 2014 Sandro Mani - 0.4.1-1 - upstream release 0.4.1 * Sat Jun 07 2014 Fedora Release Engineering - 0.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue Apr 08 2014 Jaromir Capik - 0.4.0-3 - Fixing endian checks (#962091) - Fixing FTPBS caused by rpath presence * Fri Mar 28 2014 Michael Simacek - 0.4.0-2 - Use Requires: java-headless rebuild (#1067528) * Thu Jan 02 2014 Sandro Mani - 0.4.0-1 - upstream release 0.4.0 * Wed Oct 02 2013 Sandro Mani - 0.3.1-2 - enable webpdemux * Sun Aug 04 2013 Sandro Mani - 0.3.1-1 - upstream release 0.3.1 * Sat Aug 03 2013 Fedora Release Engineering - 0.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon May 13 2013 Rahul Sundaram - 0.3.0-1 - upstream release 0.3.0 - enable gif2webp - add build requires on giflib-devel and libtiff-devel - use make_install and hardened macros - list binaries explicitly * Thu Feb 14 2013 Fedora Release Engineering - 0.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Jan 18 2013 Adam Tkac - 0.2.1-2 - rebuild due to "jpeg8-ABI" feature drop * Thu Dec 27 2012 Rahul Sundaram - 0.2.1-1 - new upstream release 0.2.1 * Fri Dec 21 2012 Adam Tkac - 0.1.3-3 - rebuild against new libjpeg * Thu Jul 19 2012 Fedora Release Engineering - 0.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Feb 02 2012 Rahul Sundaram - 0.1.3-1 - Several spec improvements by Scott Tsai * Wed May 25 2011 Rahul Sundaram - 0.1.2-1 - Initial spec. Based on openSUSE one