1 |
%define major 1 |
%define major 2 |
2 |
%define libname %mklibname vpx %{major} |
%define libname %mklibname vpx %{major} |
3 |
%define develname %mklibname -d vpx |
%define develname %mklibname -d vpx |
4 |
%define snapshot 0 |
%define snapshot 20150623 |
5 |
|
|
6 |
# disable to build without php and doxygen |
# disable to build without php and doxygen |
7 |
%define build_doc 1 |
%define build_doc 1 |
8 |
|
|
9 |
Name: libvpx |
Name: libvpx |
10 |
Summary: VP8 Video Codec SDK |
Summary: VP8 Video Codec SDK |
11 |
Version: 1.3.0 |
Version: 1.4.0 |
12 |
Release: %mkrel 4 |
Release: %mkrel 1 |
13 |
License: BSD |
License: BSD |
14 |
Group: System/Libraries |
Group: System/Libraries |
15 |
Source0: http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 |
Source0: https://github.com/webmproject/libvpx/archive/%{name}-%{?snapshot:%{snapshot}}%{!?snapshot:%{version}}.tar.gz |
16 |
Patch0: libvpx-1.3.0-size_limit.patch |
URL: http://www.webmproject.org/tools/#libvpx-sdk |
|
URL: http://www.webmproject.org/ |
|
17 |
%ifarch %{ix86} x86_64 |
%ifarch %{ix86} x86_64 |
18 |
BuildRequires: yasm |
BuildRequires: yasm |
19 |
%endif |
%endif |
23 |
%endif |
%endif |
24 |
|
|
25 |
%description |
%description |
26 |
libvpx provides the VP8 SDK, which allows you to integrate your applications |
libvpx provides the VP8 SDK, which allows you to integrate your applications |
27 |
with the VP8 video codec, a high quality, royalty free, open source codec |
with the VP8 video codec, a high quality, royalty free, open source codec |
28 |
deployed on millions of computers and devices worldwide. |
deployed on millions of computers and devices worldwide. |
29 |
|
|
30 |
|
|
31 |
%package -n %{libname} |
%package -n %{libname} |
33 |
Group: System/Libraries |
Group: System/Libraries |
34 |
|
|
35 |
%description -n %{libname} |
%description -n %{libname} |
36 |
libvpx provides the VP8 SDK, which allows you to integrate your applications |
libvpx provides the VP8 SDK, which allows you to integrate your applications |
37 |
with the VP8 video codec, a high quality, royalty free, open source codec |
with the VP8 video codec, a high quality, royalty free, open source codec |
38 |
deployed on millions of computers and devices worldwide. |
deployed on millions of computers and devices worldwide. |
39 |
|
|
40 |
|
|
41 |
%package -n %{develname} |
%package -n %{develname} |
45 |
Provides: %{name}-devel = %{version}-%{release} |
Provides: %{name}-devel = %{version}-%{release} |
46 |
|
|
47 |
%description -n %{develname} |
%description -n %{develname} |
48 |
Development libraries and headers for developing software against |
Development libraries and headers for developing software against |
49 |
libvpx. |
libvpx. |
50 |
|
|
51 |
%package utils |
%package utils |
59 |
|
|
60 |
|
|
61 |
%prep |
%prep |
62 |
%setup -q -n %{name}-v%{version} |
%setup -q -n %{name}-%{?snapshot:%{snapshot}}%{!?snapshot:%{version}} |
63 |
|
|
64 |
# fix permissions |
# fix permissions |
65 |
chmod 644 AUTHORS CHANGELOG LICENSE README |
chmod 644 AUTHORS CHANGELOG LICENSE README |
85 |
%global generic_target 0 |
%global generic_target 0 |
86 |
%endif |
%endif |
87 |
|
|
88 |
./configure \ |
sh ./configure \ |
89 |
--target=%{vpxtarget} \ |
--target=%{vpxtarget} \ |
90 |
--enable-pic \ |
--enable-pic \ |
91 |
--disable-install-srcs \ |
--disable-install-srcs \ |
92 |
--prefix=%{_prefix} \ |
--prefix=%{_prefix} \ |
93 |
--libdir=%{_libdir} \ |
--libdir=%{_libdir} \ |
94 |
--enable-shared \ |
--enable-shared \ |
95 |
--size-limit=16384x16384 |
--size-limit=16384x16384 \ |
96 |
|
--enable-postproc \ |
97 |
|
--enable-vp9-postproc \ |
98 |
|
--enable-vp8 \ |
99 |
|
--enable-vp9 |
100 |
|
|
101 |
%make verbose=true target=libs |
%make verbose=true target=libs |
102 |
|
|
105 |
mv libvpx_g.a libNOTvpx_g.a |
mv libvpx_g.a libNOTvpx_g.a |
106 |
|
|
107 |
# We need to do this so the examples can link against it. |
# We need to do this so the examples can link against it. |
108 |
ln -sf libvpx.so.%{version} libvpx.so |
#ln -sf libvpx.so.%{version} libvpx.so |
109 |
|
|
110 |
%make verbose=true target=examples |
%make verbose=true target=examples |
111 |
%make verbose=true target=docs |
%make verbose=true target=docs |
129 |
pushd %{buildroot} |
pushd %{buildroot} |
130 |
# Stuff we don't need. |
# Stuff we don't need. |
131 |
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README |
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README |
132 |
# Rename a few examples |
# Rename a few examples, move all to bindir |
133 |
mv usr/bin/postproc usr/bin/vp8_postproc |
mv usr/bin/examples/postproc usr/bin/vp8_postproc |
134 |
mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder |
mv usr/bin/examples/simple_decoder usr/bin/vp8_simple_decoder |
135 |
mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder |
mv usr/bin/examples/simple_encoder usr/bin/vp8_simple_encoder |
136 |
mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder |
mv usr/bin/examples/twopass_encoder usr/bin/vp8_twopass_encoder |
137 |
|
mv usr/bin/examples/decode_to_md5 usr/bin/vpx_decode_to_md5 |
138 |
|
mv usr/bin/examples/decode_with_drops usr/bin/vpx_decode_with_drops |
139 |
|
mv usr/bin/examples/set_maps usr/bin/vpx_set_maps |
140 |
|
mv usr/bin/examples/{vp8cx_set_ref,vp9_lossless_encoder,vpx_temporal_svc_encoder} usr/bin/ |
141 |
|
rmdir usr/bin/examples |
142 |
# Fix the binary permissions |
# Fix the binary permissions |
143 |
chmod 755 usr/bin/* |
chmod 755 usr/bin/* |
144 |
popd |
popd |