diff --git a/libvpx.spec b/libvpx.spec new file mode 100644 index 0000000000000000000000000000000000000000..3016226d77a2fda4aed1ed93918c8ad7f1968e97 --- /dev/null +++ b/libvpx.spec @@ -0,0 +1,136 @@ +%define anolis_release 1 +%global somajor 7 +%global sominor 0 +%global sotiny 0 +%global soversion %{somajor}.%{sominor}.%{sotiny} + +Name: libvpx +Summary: VP8/VP9 Video Codec SDK +Version: 1.11.0 +Release: %{anolis_release}%{?dist} +License: BSD +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/ +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: yasm +BuildRequires: doxygen, php-cli, perl(Getopt::Long) + +%description +libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications +with the VP8 and VP9 video codecs, high quality, royalty free, open source codecs +deployed on millions of computers and devices worldwide. + +%package devel +Summary: Development files for libvpx +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development libraries and headers for developing software against +libvpx. + +%package utils +Summary: VP8 utilities and tools +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +A selection of utilities and tools for VP8, including a sample encoder +and decoder. + +%prep +%setup -q -n libvpx-%{version} + +%build + +%ifarch x86_64 +%global vpxtarget x86_64-linux-gcc +%else +%ifarch aarch64 +%global vpxtarget arm64-linux-gcc +%else +%global vpxtarget generic-gnu +%endif +%endif + +%set_build_flags + +./configure --target=%{vpxtarget} \ +--disable-neon --disable-neon_asm \ +--enable-pic --disable-install-srcs \ +--enable-vp9-decoder --enable-vp9-encoder \ +--enable-experimental \ +--enable-vp9-highbitdepth \ +--enable-debug \ +--enable-shared \ +--enable-install-srcs \ +--prefix=%{_prefix} --libdir=%{_libdir} --size-limit=16384x16384 + +%make_build verbose=true + + +%install +make DIST_DIR=%{buildroot}%{_prefix} dist + +# Simpler to label the dir as %%doc. +if [ -d %{buildroot}%{_prefix}/docs ]; then + mv %{buildroot}%{_prefix}/docs doc/ +fi + +pushd %{buildroot} +# Stuff we don't need. +rm -rf .%{_prefix}/build/ .%{_prefix}/md5sums.txt .%{_libdir}*/*.a .%{_prefix}/CHANGELOG .%{_prefix}/README +# No, bad google. No treat. +mv .%{_bindir}/examples/* .%{_bindir} +rm -rf .%{_bindir}/examples + +# Rename a few examples +mv .%{_bindir}/postproc .%{_bindir}/vp8_postproc +mv .%{_bindir}/simple_decoder .%{_bindir}/vp8_simple_decoder +mv .%{_bindir}/simple_encoder .%{_bindir}/vp8_simple_encoder +mv .%{_bindir}/twopass_encoder .%{_bindir}/vp8_twopass_encoder +# Fix the binary permissions +chmod 755 .%{_bindir}/* +popd + +# Get the vpx_config.h file +cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h +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 +%license LICENSE +%doc AUTHORS CHANGELOG README +%{_libdir}/libvpx.so.%{somajor}* + +%files devel +# 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 + +%files utils +%{_bindir}/* + +%changelog +* Thu Apr 07 2022 mgb01105731 - 1.11.0-1 +- Init from upstream version 1.11.0 + diff --git a/libvpx.ver b/libvpx.ver new file mode 100644 index 0000000000000000000000000000000000000000..aa147ab5b31b4ed592a3ac837ae85fbb20a56ac2 --- /dev/null +++ b/libvpx.ver @@ -0,0 +1,79 @@ +{ global: +vpx_codec_build_config; +vpx_codec_control_; +vpx_codec_dec_init_ver; +vpx_codec_decode; +vpx_codec_destroy; +vpx_codec_enc_config_default; +vpx_codec_enc_config_set; +vpx_codec_enc_init_ver; +vpx_codec_encode; +vpx_codec_error; +vpx_codec_error_detail; +vpx_codec_err_to_string; +vpx_codec_get_caps; +vpx_codec_get_cx_data; +vpx_codec_get_frame; +vpx_codec_get_global_headers; +vpx_codec_get_mem_map; +vpx_codec_get_preview_frame; +vpx_codec_get_stream_info; +vpx_codec_iface_name; +vpx_codec_peek_stream_info; +vpx_codec_register_put_frame_cb; +vpx_codec_register_put_slice_cb; +vpx_codec_set_cx_data_buf; +vpx_codec_set_frame_buffer_functions; +vpx_codec_set_mem_map; +vpx_codec_version; +vpx_codec_version_extra_str; +vpx_codec_version_str; +vpx_codec_vp8_algo; +vpx_codec_vp8_cx; +vpx_codec_vp8_cx_algo; +vpx_codec_vp8_dx; +vpx_codec_vp8_dx_algo; +vpx_codec_vp9_cx; +vpx_codec_vp9_cx_algo; +vpx_codec_vp9_dx; +vpx_codec_vp9_dx_algo; +vpx_dec_control; +vpx_dec_decode; +vpx_dec_destroy; +vpx_dec_error; +vpx_dec_error_detail; +vpx_dec_err_to_string; +vpx_dec_get_caps; +vpx_dec_get_frame; +vpx_dec_get_mem_map; +vpx_dec_get_stream_info; +vpx_dec_iface_name; +vpx_dec_init_ver; +vpx_dec_peek_stream_info; +vpx_dec_register_put_frame_cb; +vpx_dec_register_put_slice_cb; +vpx_dec_set_mem_map; +vpx_dec_xma_init_ver; +vpx_enc_vp8_algo; +vpx_img_alloc; +vpx_img_flip; +vpx_img_free; +vpx_img_set_rect; +vpx_img_wrap; +vpx_svc_dump_statistics; +vpx_svc_encode; +vpx_svc_get_buffer; +vpx_svc_get_encode_frame_count; +vpx_svc_get_frame_size; +vpx_svc_get_layer_resolution; +vpx_svc_get_message; +vpx_svc_get_rc_stats_buffer; +vpx_svc_get_rc_stats_buffer_size; +vpx_svc_init; +vpx_svc_is_keyframe; +vpx_svc_release; +vpx_svc_set_keyframe; +vpx_svc_set_options; +vpx_svc_set_quantizers; +vpx_svc_set_scale_factors; +local: *; }; diff --git a/v1.11.0.tar.gz b/v1.11.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f4adf2bd0656d6224caf2b36e8379bad1ce13a85 Binary files /dev/null and b/v1.11.0.tar.gz differ diff --git a/vpx_config.h b/vpx_config.h new file mode 100644 index 0000000000000000000000000000000000000000..d2ded8c5ee11164ed9103bf52d49438017bdc075 --- /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