]>
Commit | Line | Data |
---|---|---|
c9ee805b ER |
1 | # |
2 | # Conditional build: | |
d5d82930 | 3 | %bcond_without asm # x86 assembler |
a7d444e9 | 4 | %bcond_without doc # don't build doc |
ecadc52c | 5 | %bcond_with tests # build tests (not useful, creates libgtest.a) |
5f38e725 ER |
6 | %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano) |
7 | ||
30fcd8a5 | 8 | %ifnarch %{ix86} %{x8664} x32 |
f2369026 ER |
9 | %undefine with_asm |
10 | %endif | |
11 | ||
5f38e725 ER |
12 | %if "%{pld_release}" == "ac" |
13 | # not supported by compiler | |
14 | %undefine with_ssse3 | |
15 | %endif | |
3c828a1d | 16 | |
bccc9f86 | 17 | Summary: VP8, a high-quality video codec |
d5d82930 | 18 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości |
bccc9f86 | 19 | Name: libvpx |
f6650439 | 20 | Version: 1.7.0 |
05641fc7 | 21 | Release: 1 |
bccc9f86 AM |
22 | License: BSD |
23 | Group: Libraries | |
627f7539 | 24 | #Source0Download: http://downloads.webmproject.org/releases/webm/index.html |
f6650439 JB |
25 | Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?fakename=/%{name}-%{version}.tar.gz |
26 | # Source0-md5: df97945958d8514ba9fc6ca5ca39ae6a | |
bccc9f86 | 27 | URL: http://www.webmproject.org/ |
a28e5963 | 28 | BuildRequires: doxygen |
71ced3dc | 29 | %{?with_tests:BuildRequires: libstdc++-devel} |
efdc9f5e | 30 | BuildRequires: pkgconfig |
a7d444e9 | 31 | BuildRequires: rpmbuild(macros) >= 1.673 |
9026bd8c | 32 | BuildRequires: sed >= 4.0 |
3c828a1d | 33 | %{?with_asm:BuildRequires: yasm >= 0.8} |
a7d444e9 ER |
34 | %if %{with doc} |
35 | BuildRequires: %{php_name}-pcre | |
36 | BuildRequires: %{php_name}-program | |
37 | %endif | |
bccc9f86 AM |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
e1331b3a ER |
40 | %define generic_target generic-gnu |
41 | %define vpxtarget %{generic_target} | |
42 | %ifarch %{x8664} | |
43 | %define vpxtarget x86_64-linux-gcc | |
44 | %endif | |
45 | %ifarch %{ix86} | |
46 | %define vpxtarget x86-linux-gcc | |
47 | %endif | |
48 | %ifarch ppc | |
49 | %define vpxtarget ppc32-linux-gcc | |
50 | %endif | |
51 | %ifarch ppc64 | |
52 | %define vpxtarget ppc64-linux-gcc | |
53 | %endif | |
54 | ||
bccc9f86 AM |
55 | %description |
56 | VP8, a high-quality video codec. | |
57 | ||
d5d82930 JB |
58 | %description -l pl.UTF-8 |
59 | VP8 - kodek obrazu wysokiej jakości. | |
60 | ||
bccc9f86 | 61 | %package devel |
d5d82930 JB |
62 | Summary: Header files for libvpx |
63 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 64 | Group: Development/Libraries |
d5d82930 | 65 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
66 | |
67 | %description devel | |
d5d82930 JB |
68 | Header files for libvpx library. |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
72 | |
73 | %package static | |
74 | Summary: Static libvpx library | |
d5d82930 | 75 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 76 | Group: Development/Libraries |
d5d82930 | 77 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
78 | |
79 | %description static | |
80 | Static libvpx library. | |
81 | ||
d5d82930 JB |
82 | %description static -l pl.UTF-8 |
83 | Statyczna biblioteka libvpx. | |
84 | ||
59ff1590 JB |
85 | %package tools |
86 | Summary: VPX decoding/encoding tools | |
87 | Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX | |
88 | Group: Applications/Graphics | |
89 | Requires: %{name} = %{version}-%{release} | |
90 | ||
91 | %description tools | |
92 | VPX decoding/encoding tools. | |
93 | ||
94 | %description tools -l pl.UTF-8 | |
95 | Narzędzia do kodowania/dekodowania formatu VPX. | |
96 | ||
bccc9f86 | 97 | %prep |
f6650439 | 98 | %setup -q -c |
bccc9f86 AM |
99 | |
100 | %build | |
d5d82930 JB |
101 | install -d obj |
102 | cd obj | |
bccc9f86 | 103 | # not autoconf configure |
2f02a711 JB |
104 | CC="%{__cc}" \ |
105 | CXX="%{__cxx}" \ | |
16ab9c5e | 106 | CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \ |
bccc9f86 | 107 | ../configure \ |
7b991969 | 108 | %if %{with asm} |
dcde509e | 109 | --as=yasm \ |
61956466 | 110 | %endif |
e1331b3a | 111 | --target=%{vpxtarget} \ |
6c7c0f8b | 112 | --enable-shared \ |
5f38e725 | 113 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 114 | --disable-optimizations \ |
2f397753 | 115 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ |
f0a288d6 ER |
116 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ |
117 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
bccc9f86 | 118 | --enable-vp8 \ |
2f02a711 | 119 | --enable-vp8 \ |
bccc9f86 AM |
120 | --enable-postproc \ |
121 | --enable-runtime-cpu-detect | |
0257ab6e | 122 | |
0257ab6e | 123 | %{__make} verbose=true target=libs \ |
938aec6f | 124 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 125 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
126 | |
127 | %{__make} verbose=true target=examples \ | |
dcde509e | 128 | LDFLAGS="%{rpmldflags} -L." |
a7d444e9 ER |
129 | |
130 | %if %{with doc} | |
0257ab6e | 131 | %{__make} verbose=true target=docs |
a7d444e9 | 132 | %endif |
0257ab6e | 133 | |
bccc9f86 AM |
134 | %install |
135 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 136 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e | 137 | |
6c7c0f8b | 138 | %{__make} -C obj verbose=true install \ |
938aec6f ER |
139 | LIBSUBDIR=%{_lib} \ |
140 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
0257ab6e | 141 | |
f6650439 | 142 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.5.0 |
9026bd8c JB |
143 | |
144 | # adjust prefix and libdir | |
3c828a1d | 145 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
146 | |
147 | %clean | |
148 | rm -rf $RPM_BUILD_ROOT | |
149 | ||
2f397753 | 150 | %post -p /sbin/ldconfig |
bccc9f86 AM |
151 | %postun -p /sbin/ldconfig |
152 | ||
153 | %files | |
154 | %defattr(644,root,root,755) | |
d5d82930 | 155 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
47f853c3 | 156 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
f6650439 | 157 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.5 |
bccc9f86 AM |
158 | |
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
47f853c3 | 161 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 162 | %{_includedir}/vpx |
9026bd8c | 163 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
164 | |
165 | %files static | |
166 | %defattr(644,root,root,755) | |
0257ab6e | 167 | %{_libdir}/libvpx.a |
59ff1590 JB |
168 | |
169 | %files tools | |
170 | %defattr(644,root,root,755) | |
171 | %attr(755,root,root) %{_bindir}/vpxdec | |
172 | %attr(755,root,root) %{_bindir}/vpxenc |