%define _libdir64 %{_prefix}/lib64 Name: libwebp Version: 1.0.1 Release: 1 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/%{name}-%{version}.tar.gz Source1: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz.asc Source2: %{name}.so.2-aix32 Source3: %{name}.so.2-aix64 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: giflib-devel >= 5.1.9-1 BuildRequires: libjpeg-devel >= 9c-1 BuildRequires: libpng-devel >= 1.6.37-1 BuildRequires: libtiff-devel >= 4.0.10-1 %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 Requires: giflib >= 5.1.9-1 Requires: libjpeg >= 9c-1 Requires: libpng >= 1.6.37-1 Requires: libtiff >= 4.0.10-1 %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} = %{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. %prep %setup -q cd examples # fake a as AIX5L V5.1 and XLC/C++ V7 doesn't have one cat > stdbool.h << EOF #ifndef stdbool_h_wrapper #define stdbool_h_wrapper typedef enum {false = 0, true = 1} bool; #endif EOF cd .. mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-libwebpmux \ --enable-libwebpdemux \ --enable-libwebpdecoder make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-libwebpmux \ --enable-libwebpdemux \ --enable-libwebpdecoder make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects for i in libwebp libwebpdecoder libwebpdemux libwebpmux ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/${i}.a ${RPM_BUILD_ROOT}%{_libdir64}/${i}.so* done # Add the older version 0.1.3 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} %{name}.so.2 /usr/bin/strip -X32 -e %{name}.so.2 /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a %{name}.so.2 cp %{name}.so.2 ${RPM_BUILD_ROOT}%{_libdir}/ cp %{SOURCE3} %{name}.so.2 /usr/bin/strip -X64 -e %{name}.so.2 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a %{name}.so.2 cp %{name}.so.2 ${RPM_BUILD_ROOT}%{_libdir64}/ ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/README 32bit/PATENTS 32bit/COPYING 32bit/NEWS 32bit/AUTHORS %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la /usr/lib64/*.la %files tools %defattr(-,root,system,-) %{_bindir}/* %{_mandir}/man?/* /usr/bin/* %changelog * Wed May 29 2019 Michael Perzl - 1.0.1-1 - updated to version 1.0.1 * Wed May 29 2019 Michael Perzl - 1.0.0-1 - updated to version 1.0.0 * Wed Jan 29 2014 Michael Perzl - 0.4.0-1 - updated to version 0.4.0 * Wed Jun 26 2013 Michael Perzl - 0.3.0-1 - updated to version 0.3.0 * Fri May 03 2013 Michael Perzl - 0.2.1-1 - updated to version 0.2.1 * Mon Jul 09 2012 Michael Perzl - 0.1.3-1 - first version for AIX V5.1 and higher