diff --git a/libvpx.spec b/libvpx.spec index 2d7c0bc..39f37af 100644 --- a/libvpx.spec +++ b/libvpx.spec @@ -6,11 +6,12 @@ Name: libvpx Summary: VP8/VP9 Video Codec SDK Version: 1.7.0 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: System Environment/Libraries #Source0: http://downloads.webmproject.org/releases/webm/%{name}-%{version}.tar.bz2 Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz +Source1: vpx_config.h # Thanks to debian. Source2: libvpx.ver URL: http://www.webmproject.org/code/ @@ -94,6 +95,7 @@ CROSS=armv7hl-redhat-linux-gnueabi- CHOST=armv7hl-redhat-linux-gnueabi-hardfloat %if ! %{generic_target} --enable-shared \ %endif +--enable-install-srcs \ --prefix=%{_prefix} --libdir=%{_libdir} --size-limit=16384x16384 # Hack our optflags in. @@ -177,6 +179,36 @@ mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder chmod 755 usr/bin/* popd +# Get the vpx_config.h file +%ifarch %{arm} +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-arm.h +%else +# Does ppc64le need its own? +%ifarch ppc64 ppc64le +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-ppc64.h +%else +%ifarch s390 s390x +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-s390.h +%else +%ifarch %{ix86} +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-x86.h +%else +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h +%endif +%endif +%endif +%endif +cp %{SOURCE1} %{buildroot}%{_includedir}/vpx/vpx_config.h +# for timestamp sync +touch -r AUTHORS %{buildroot}%{_includedir}/vpx/vpx_config.h + +mv %{buildroot}%{_prefix}/src/vpx_dsp %{buildroot}%{_includedir}/ +mv %{buildroot}%{_prefix}/src/vpx_mem %{buildroot}%{_includedir}/ +mv %{buildroot}%{_prefix}/src/vpx_ports %{buildroot}%{_includedir}/ +mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/ + +rm -rf %{buildroot}%{_prefix}/src + %ldconfig_scriptlets %files @@ -188,6 +220,10 @@ popd # These are SDK docs, not really useful to an end-user. %doc docs/html/ %{_includedir}/vpx/ +%{_includedir}/vpx_dsp/ +%{_includedir}/vpx_mem/ +%{_includedir}/vpx_ports/ +%{_includedir}/vpx_scale/ %{_libdir}/pkgconfig/vpx.pc %{_libdir}/libvpx.so @@ -195,6 +231,10 @@ popd %{_bindir}/* %changelog +* Sat Feb 3 2018 Tom Callaway - 1.7.0-3 +- package more files (for firefox) +- setup vpx_config.h for multilib + * Sat Feb 03 2018 Igor Gnatenko - 1.7.0-2 - Switch to %%ldconfig_scriptlets diff --git a/vpx_config.h b/vpx_config.h new file mode 100644 index 0000000..d2ded8c --- /dev/null +++ b/vpx_config.h @@ -0,0 +1,18 @@ +/* Provide a real file - not a symlink - as it would cause multiarch conflicts + (when multiple different arch releases are installed simultaneously. */ + +#if defined __x86_64__ +# include "vpx_config-x86_64.h" +#elif defined __aarch64__ +# include "vpx_config-aarch64.h" +#elif defined __arm__ +# include "vpx_config-arm.h" +#elif defined __i386__ +# include "vpx_config-x86.h" +#elif defined __powerpc64__ +# include "vpx_config-ppc64.h" +#elif defined __s390__ +# include "vpx_config-s390.h" +#else +# error "Unsupported arch" +#endif