%ifarch %{ix86} %define vpxtarget x86-linux-gcc %else %ifarch x86_64 %define vpxtarget x86_64-linux-gcc %else %ifarch arm %define vpxtarget armv5te-linux-gcc %else %define vpxtarget generic-gnu %endif %endif %endif %if "%{vpxtarget}" == "generic-gnu" %define generic_target 1 %define majver %(echo %version | cut -d. -f 1-2) %define major %(echo %version | cut -d. -f -1) %else %define generic_target 0 %endif Name: libvpx0 Version: 0.9.6 Release: 4mamba Summary: VP8 Video Codec SDK Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: gil URL: http://code.google.com/p/webm/ Source0: http://webm.googlecode.com/files/libvpx-v%{version}.tar.bz2 Source1: libvpx.pc # from debian Source2: libvpx.ver Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch Patch1: libvpx-0.9.5-I6266aba7.patch License: BSD BuildRequires: doxygen ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END %if "%{stage1}" !="1" BuildRequires: php # TODO BuildRequires: %{_bindir}/php-cli %endif BuildRequires: yasm BuildRoot: %{_tmppath}/%{name}-%{version}-root %description libvpx provides the VP8 SDK, which allows you to integrate your applications with the VP8 video codec, a high quality, royalty free, open source codec deployed on millions of computers and devices worldwide. %package devel Group: Development/Libraries Summary: Static libraries and headers for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel libvpx - VP8 Video Codec SDK. This package contains static libraries and header files need for development. %package utils Group: Development/Tools Summary: Utility applications for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description utils libvpx - VP8 Video Codec SDK. The %{name}-tools package contains a selection of utilities and tools for VP8, including a sample encoder and decoder. %package docs Group: Documentation Summary: libvpx API documentation %description docs libvpx - VP8 Video Codec SDK. This package contains libvpx API documentation. %prep %setup -q -n libvpx-v%{version} %patch0 -p1 # % patch1 -p1 %build CROSS=%{_host}- \ ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --enable-pic \ --disable-install-srcs \ %if "%{stage1}" !="1" --enable-install-docs \ %endif %if ! %{generic_target} --enable-shared \ %endif --target=%{vpxtarget} sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk %make verbose=true target=libs %if %{generic_target} mkdir tmp cd tmp ar x ../libvpx_g.a cd .. gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{version} tmp/*.o rm -rf tmp %endif mv libvpx.a libNOTvpx.a mv libvpx_g.a libNOTvpx_g.a ln -sf libvpx.so.%{version} libvpx.so %make verbose=true target=examples %make verbose=true target=docs mv libNOTvpx.a libvpx.a mv libNOTvpx_g.a libvpx_g.a %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" make DIST_DIR=%{buildroot}%{_prefix} dist mkdir -p %{buildroot}%{_exec_prefix}/lib/pkgconfig/ install -m 644 %{SOURCE1} %{buildroot}%{_exec_prefix}/lib/pkgconfig/ sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_exec_prefix}/lib/pkgconfig/libvpx.pc sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_exec_prefix}/lib/pkgconfig/libvpx.pc sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_exec_prefix}/lib/pkgconfig/libvpx.pc rm -rf %{buildroot}%{_includedir}/vpx/*.h install -m 644 vpx/vp8.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vp8cx.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vp8dx.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vp8e.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_codec.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_codec_impl_bottom.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_codec_impl_top.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_decoder.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_decoder_compat.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_encoder.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_image.h %{buildroot}%{_includedir}/vpx install -m 644 vpx/vpx_integer.h %{buildroot}%{_includedir}/vpx %if "%{stage1}" !="1" mv %{buildroot}/usr/docs doc/ %endif %if %{generic_target} install -pm 755 libvpx.so.%{version} %{buildroot}%{_libdir} pushd %{buildroot}%{_libdir} ln -sf libvpx.so.%{version} libvpx.so ln -sf libvpx.so.%{version} libvpx.so.%{major} ln -sf libvpx.so.%{version} libvpx.so.%{majver} popd %endif rm -rf %{buildroot}%{_prefix}/build/ rm -rf %{buildroot}%{_prefix}/md5sums.txt rm -rf %{buildroot}%{_prefix}/CHANGELOG rm -rf %{buildroot}%{_prefix}/README rm -rf %{buildroot}%{_prefix}/lib*/*.a pushd %{buildroot}%{_bindir} mv postproc vp8_postproc mv simple_decoder vp8_simple_decoder mv simple_encoder vp8_simple_encoder mv twopass_encoder vp8_twopass_encoder chmod 755 * popd %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %{_libdir}/libvpx.so.* %doc AUTHORS LICENSE %files devel %defattr(-,root,root) %dir %{_includedir}/vpx %{_includedir}/vpx/*.h %{_libdir}/libvpx.so %{_exec_prefix}/lib/pkgconfig/libvpx.pc %doc CHANGELOG README %files utils %defattr(-,root,root) %{_bindir}/decode_to_md5 %{_bindir}/decode_with_drops %{_bindir}/error_resilient %{_bindir}/force_keyframe %{_bindir}/vp8_postproc %{_bindir}/vp8_scalable_patterns %{_bindir}/vp8_set_maps %{_bindir}/vp8_simple_decoder %{_bindir}/vp8_simple_encoder %{_bindir}/vp8_twopass_encoder %{_bindir}/vp8cx_set_ref %{_bindir}/vpxdec %{_bindir}/vpxenc %if "%{stage1}" !="1" %files docs %defattr(-,root,root) %doc docs/html/ %endif %changelog * Wed Nov 14 2012 Silvan Calarco 0.9.6-4mamba - rebuilt as legacy package * Tue Aug 02 2011 Silvan Calarco 0.9.6-3mamba - rebuilt in devel * Fri Mar 18 2011 gil 0.9.6-2mamba - fix broken header files * Fri Mar 18 2011 gil 0.9.6-1mamba - update to 0.9.6 * Fri Feb 25 2011 gil 0.9.5-1mamba - package created by autospec