diff --git a/libvpx.spec b/libvpx.spec index c834ddd336b5528179a971b89abf5431253b4cca..9f99d5c3d54e820eec688c2d7b6f8e3906cb6822 100644 --- a/libvpx.spec +++ b/libvpx.spec @@ -1,24 +1,30 @@ -%define anolis_release 1 +%define anolis_release 2 %global somajor 7 %global sominor 0 %global sotiny 0 %global soversion %{somajor}.%{sominor}.%{sotiny} +%ifarch x86_64 +%global vpxtarget x86_64-linux-gcc +%else +%ifarch aarch64 +%global vpxtarget arm64-linux-gcc +%else +%global vpxtarget generic-gnu +%endif +%endif + Name: libvpx Summary: VP8/VP9 Video Codec SDK Version: 1.12.0 Release: %{anolis_release}%{?dist} License: BSD +URL: http://www.webmproject.org/code/ 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) + +BuildRequires: make gcc gcc-c++ yasm doxygen php-cli perl(Getopt::Long) %description libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications @@ -27,7 +33,7 @@ deployed on millions of computers and devices worldwide. %package devel Summary: Development files for libvpx -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{EVR} %description devel Development libraries and headers for developing software against @@ -35,27 +41,24 @@ libvpx. %package utils Summary: VP8 utilities and tools -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{EVR} %description utils A selection of utilities and tools for VP8, including a sample encoder and decoder. -%prep -%setup -q -n libvpx-%{version} +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch -%build +%description doc +The %{name}-doc package contains documentation files for %{name}. -%ifarch x86_64 -%global vpxtarget x86_64-linux-gcc -%else -%ifarch aarch64 -%global vpxtarget arm64-linux-gcc -%else -%global vpxtarget generic-gnu -%endif -%endif +%prep +%autosetup -p1 -n libvpx-%{version} +%build %set_build_flags ./configure --target=%{vpxtarget} \ @@ -74,31 +77,24 @@ and decoder. %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}/ @@ -110,11 +106,9 @@ rm -rf %{buildroot}%{_prefix}/src %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/ @@ -127,7 +121,12 @@ rm -rf %{buildroot}%{_prefix}/src %files utils %{_bindir}/* +%files doc +%doc AUTHORS CHANGELOG README + %changelog +* Wed Apr 12 2023 Kaihao Bai - 1.12.0-2 + * Fri Jan 20 2023 Funda Wang - 1.12.0-1 - New version 1.12.0