Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 856070324a4c06c80742dba0efeedcd1 > files > 4

libvpx-1.3.0-3.2.mga5.src.rpm

%define major 1
%define libname %mklibname vpx %{major}
%define develname %mklibname -d vpx
%define snapshot 0

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

Name:		libvpx
Summary:	VP8 Video Codec SDK
Version:	1.3.0
%define subrel	2
Release:	%mkrel 3
License:	BSD
Group:		System/Libraries
Source0:	http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
Patch0:		libvpx-1.3.0-size_limit.patch
Patch1:		libvpx-1.3.0-CVE-2017-13194.patch
URL:		http://www.webmproject.org/
%ifarch %{ix86} x86_64
BuildRequires:	yasm
%endif
%if %{build_doc}
BuildRequires:	doxygen
BuildRequires:	php-cli
%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}-v%{version}

# fix permissions
chmod 644 AUTHORS CHANGELOG LICENSE README
%apply_patches

%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

./configure \
    --target=%{vpxtarget} \
    --enable-pic \
    --disable-install-srcs \
    --prefix=%{_prefix} \
    --libdir=%{_libdir} \
    --enable-shared \
    --size-limit=16384x16384

%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
mv usr/bin/postproc usr/bin/vp8_postproc
mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
# 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 luigiwalser <luigiwalser> 1.3.0-3.2.mga5
+ Revision: 1197847
- rediff patch from mga6 to fix CVE-2017-13194
- 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


* Fri Nov 05 2010 Götz Waschk <waschk@mandriva.org> 0.9.5-1mdv2011.0
+ Revision: 593687
- new version

* Thu Sep 09 2010 Götz Waschk <waschk@mandriva.org> 0.9.2-1mdv2011.0
+ Revision: 576927
- new version
- fix source URL

* Sun Jul 11 2010 Götz Waschk <waschk@mandriva.org> 0.9.1-2mdv2011.0
+ Revision: 550634
- fix utils dep

* Sat Jun 26 2010 Götz Waschk <waschk@mandriva.org> 0.9.1-1mdv2011.0
+ Revision: 549187
- new version
- installation fixes
- import libvpx


* Wed May 26 2010 Götz Waschk <waschk@mandriva.org> 0.9.0-1mdv2010.1
- import from Fedora

* Fri May 21 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-5
- fix noexecstack flag

* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-4
- BuildRequires: yasm (we're optimized again)

* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-3
- add pkg-config file
- move headers into include/vpx/
- enable optimization

* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-2
- fix permissions on binaries
- rename generic binaries to v8_*
- link shared library to -lm, -lpthread to resolve missing weak symbols

* Wed May 19 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-1
- Initial package for Fedora