Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 4837704270d1940a937a9daea8127bc4 > files > 3

libvpx-1.5.0-3.1.mga6.src.rpm

%define subrel 1
%define major 3
%define libname %mklibname vpx %{major}
%define develname %mklibname -d vpx
#define snapshot 20150623

# disable to build without php and doxygen
%define build_doc 1

Name:		libvpx
Summary:	VP8 Video Codec SDK
Version:	1.5.0
Release:	%mkrel 3
License:	BSD
Group:		System/Libraries
Source0:	https://github.com/webmproject/libvpx/archive/%{name}-%{?snapshot:%{snapshot}}%{!?snapshot:%{version}}.tar.bz2
# adapted from libvpx 1.7.0: fix CVE-2017-13194
# https://github.com/webmproject/libvpx/commit/ffa3a3c4418ab69f000dacb5fd631922af01307a
Patch1:		libvpx-1.5.0-CVE-2017-13194.patch
URL:		http://www.webmproject.org/tools/#libvpx-sdk
%ifarch %{ix86} x86_64
BuildRequires:	yasm
%endif
%if %{build_doc}
BuildRequires:	doxygen
%endif

%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 -n	%{libname}
Summary:	VP8 Video Codec SDK
Group:		System/Libraries

%description -n	%{libname}
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 -n	%{develname}
Summary:	Development files for libvpx
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description -n	%{develname}
Development libraries and headers for developing software against
libvpx.

%package	utils
Summary:	VP8 utilities and tools
Group:		Video/Utilities
Requires:	%{libname} = %{version}-%{release}

%description	utils
A selection of utilities and tools for VP8, including a sample encoder
and decoder.


%prep
%setup -q -n %{name}-%{?snapshot:%{snapshot}}%{!?snapshot:%{version}}

# fix permissions
chmod 644 AUTHORS CHANGELOG LICENSE README
%autopatch -p1

%build
%ifarch %{ix86}
%global vpxtarget x86-linux-gcc
%else
%ifarch	x86_64
%global	vpxtarget x86_64-linux-gcc
%else
%global vpxtarget generic-gnu
%endif
%endif
%setup_compile_flags

# The configure script will reject the shared flag on the generic target
# This means we need to fall back to the manual creation we did before. :P
%if "%{vpxtarget}" == "generic-gnu"
%global generic_target 1
%else
%global generic_target 0
%endif

sh ./configure \
    --target=%{vpxtarget} \
    --enable-pic \
    --disable-install-srcs \
    --prefix=%{_prefix} \
    --libdir=%{_libdir} \
    --enable-shared \
    --size-limit=16384x16384 \
    --enable-postproc \
    --enable-experimental --enable-spatial-svc \
    --enable-vp9-postproc \
    --enable-vp8 \
    --enable-vp9

%make verbose=true target=libs

# Temporarily dance the static libs out of the way
mv libvpx.a libNOTvpx.a
mv libvpx_g.a libNOTvpx_g.a

# We need to do this so the examples can link against it.
#ln -sf libvpx.so.%{version} libvpx.so

%make verbose=true target=examples
%make verbose=true target=docs

# Put them back so the install doesn't fail
mv libNOTvpx.a libvpx.a
mv libNOTvpx_g.a libvpx_g.a

%install
make DIST_DIR=%{buildroot}%{_prefix} dist

# Install the pkg-config file
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
ln -s vpx.pc %{buildroot}%{_libdir}/pkgconfig/libvpx.pc

%if %{build_doc}
# Simpler to label the dir as %doc.
mv %{buildroot}/usr/docs doc/
%endif

pushd %{buildroot}
# Stuff we don't need.
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
# Rename a few examples, move all to bindir
mv usr/bin/examples/postproc usr/bin/vp8_postproc
mv usr/bin/examples/simple_decoder usr/bin/vp8_simple_decoder
mv usr/bin/examples/simple_encoder usr/bin/vp8_simple_encoder
mv usr/bin/examples/twopass_encoder usr/bin/vp8_twopass_encoder
mv usr/bin/examples/decode_to_md5 usr/bin/vpx_decode_to_md5
mv usr/bin/examples/decode_with_drops usr/bin/vpx_decode_with_drops
mv usr/bin/examples/set_maps usr/bin/vpx_set_maps
mv usr/bin/examples/vp9_spatial_svc_encoder usr/bin/
mv usr/bin/examples/{vp8cx_set_ref,vp9_lossless_encoder,vpx_temporal_svc_encoder} usr/bin/
rmdir usr/bin/examples
# Fix the binary permissions
chmod 755 usr/bin/*
popd

%files -n %{libname}
%doc AUTHORS CHANGELOG LICENSE README
%{_libdir}/libvpx.so.%{major}{,.*}

%files -n %{develname}
%if %{build_doc}
# These are SDK docs, not really useful to an end-user.
%doc docs/html
%endif
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libvpx.so
# to fix weird header files permissions
%defattr(644,root,root,755)
%{_includedir}/vpx/

%files utils
%{_bindir}/*


%changelog
* Sun Jan 28 2018 cjw <cjw> 1.5.0-3.1.mga6
+ Revision: 1197837
- patch1: fix for CVE-2017-13194

* Thu Mar 17 2016 tv <tv> 1.5.0-3.mga6
+ Revision: 992380
- enable experimental support for spatial SVC (needed for firefox-beta and later chrome)

* Sat Feb 20 2016 umeabot <umeabot> 1.5.0-2.mga6
+ Revision: 972583
- Mageia 6 Mass Rebuild

* Sun Nov 15 2015 tv <tv> 1.5.0-1.mga6
+ Revision: 903462
- major is now 3
- new release
- new release

* Tue Sep 15 2015 blino <blino> 1.4.0-2.mga6
+ Revision: 879688
- drop php as a buildrequires

* Sat Jun 27 2015 cjw <cjw> 1.4.0-1.mga6
+ Revision: 846206
- post-1.4.0 snapshot from 23-06-2015

* Sun Jun 14 2015 luigiwalser <luigiwalser> 1.3.0-4.mga6
+ Revision: 823142
- add upstream patch to add configure option to limit frame size in decoder
- use configure option to limit frame size 16384x16384 (fix CVE-2015-1258)

* Wed Oct 15 2014 umeabot <umeabot> 1.3.0-3.mga5
+ Revision: 750244
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.3.0-2.mga5
+ Revision: 681851
- Mageia 5 Mass Rebuild

* Fri Feb 07 2014 fwang <fwang> 1.3.0-1.mga5
+ Revision: 585346
- new version 1.3.0

* Sat Oct 19 2013 umeabot <umeabot> 1.2.0-2.mga4
+ Revision: 532460
- Mageia 4 Mass Rebuild

* Tue Aug 20 2013 luigiwalser <luigiwalser> 1.2.0-1.mga4
+ Revision: 468447
- 1.2.0 (tarball from fedora)
- remove patch which should no longer be needed

* Sat Jan 12 2013 umeabot <umeabot> 1.1.0-3.mga3
+ Revision: 358427
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Oct 12 2012 rtp <rtp> 1.1.0-2.mga3
+ Revision: 304825
- fix group
- Merge debian patch to allow to always use enabled-shared for all targets.
  This makes "generic" target work and renders the hacks in the spec obseletes

* Sun Jun 03 2012 luigiwalser <luigiwalser> 1.1.0-1.mga3
+ Revision: 253523
- 1.1.0

* Fri Mar 02 2012 fwang <fwang> 1.0.0-1.mga2
+ Revision: 216634
- new version 1.0.0
- use numeric-only ver
- 0.9.7p1
- inew version 0.9.7 (libvpx.pc now points to upstream vpx.pc)

  + luigiwalser <luigiwalser>
    - use macro to enable optflags (from mdv)

  + kamil <kamil>
    - clean .spec

* Thu Apr 21 2011 rtp <rtp> 0.9.6-4.mga1
+ Revision: 89409
- fix generic target build as done in Fedora

* Thu Mar 24 2011 boklm <boklm> 0.9.6-3.mga1
+ Revision: 76184
- rebuild for bug #497

* Mon Mar 21 2011 ahmad <ahmad> 0.9.6-2.mga1
+ Revision: 75316
- fix file permissions

* Sat Mar 19 2011 ahmad <ahmad> 0.9.6-1.mga1
+ Revision: 74533
- update to 0.9.6
- sync with Fedora
- re-enable building the docs
- make building the docs condintional and disable it for now
- imported package libvpx