]>
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 | 6 | %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano) |
44b37573 | 7 | %bcond_without vp9_encoder # vp9 encoder |
5f38e725 | 8 | |
f2369026 ER |
9 | %ifnarch %{ix86} %{x8664} |
10 | %undefine with_asm | |
11 | %endif | |
12 | ||
5f38e725 ER |
13 | %if "%{pld_release}" == "ac" |
14 | # not supported by compiler | |
15 | %undefine with_ssse3 | |
16 | %endif | |
3c828a1d | 17 | |
44b37573 ER |
18 | # old gcc gets stuck on ac |
19 | %ifarch sparc | |
20 | %undefine with_vp9_encoder | |
21 | %endif | |
22 | ||
bccc9f86 | 23 | Summary: VP8, a high-quality video codec |
d5d82930 | 24 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości |
bccc9f86 | 25 | Name: libvpx |
1e757208 | 26 | Version: 1.3.0 |
eaaadea9 | 27 | Release: 3 |
bccc9f86 AM |
28 | License: BSD |
29 | Group: Libraries | |
1e757208 JB |
30 | #Source0Download: http://code.google.com/p/webm/downloads/list |
31 | #Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 | |
488ced65 JB |
32 | # source, but regenerated on each fetch |
33 | #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz | |
34 | Source0: %{name}-%{version}.tar.gz | |
1e757208 | 35 | # Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729 |
bccc9f86 | 36 | URL: http://www.webmproject.org/ |
a28e5963 | 37 | BuildRequires: doxygen |
71ced3dc | 38 | %{?with_tests:BuildRequires: libstdc++-devel} |
efdc9f5e | 39 | BuildRequires: pkgconfig |
a7d444e9 | 40 | BuildRequires: rpmbuild(macros) >= 1.673 |
9026bd8c | 41 | BuildRequires: sed >= 4.0 |
3c828a1d | 42 | %{?with_asm:BuildRequires: yasm >= 0.8} |
a7d444e9 ER |
43 | %if %{with doc} |
44 | BuildRequires: %{php_name}-pcre | |
45 | BuildRequires: %{php_name}-program | |
46 | %endif | |
bccc9f86 AM |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
e1331b3a ER |
49 | %define generic_target generic-gnu |
50 | %define vpxtarget %{generic_target} | |
51 | %ifarch %{x8664} | |
52 | %define vpxtarget x86_64-linux-gcc | |
53 | %endif | |
54 | %ifarch %{ix86} | |
55 | %define vpxtarget x86-linux-gcc | |
56 | %endif | |
57 | %ifarch ppc | |
58 | %define vpxtarget ppc32-linux-gcc | |
59 | %endif | |
60 | %ifarch ppc64 | |
61 | %define vpxtarget ppc64-linux-gcc | |
62 | %endif | |
63 | ||
bccc9f86 AM |
64 | %description |
65 | VP8, a high-quality video codec. | |
66 | ||
d5d82930 JB |
67 | %description -l pl.UTF-8 |
68 | VP8 - kodek obrazu wysokiej jakości. | |
69 | ||
bccc9f86 | 70 | %package devel |
d5d82930 JB |
71 | Summary: Header files for libvpx |
72 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 73 | Group: Development/Libraries |
d5d82930 | 74 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
75 | |
76 | %description devel | |
d5d82930 JB |
77 | Header files for libvpx library. |
78 | ||
79 | %description devel -l pl.UTF-8 | |
80 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
81 | |
82 | %package static | |
83 | Summary: Static libvpx library | |
d5d82930 | 84 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 85 | Group: Development/Libraries |
d5d82930 | 86 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
87 | |
88 | %description static | |
89 | Static libvpx library. | |
90 | ||
d5d82930 JB |
91 | %description static -l pl.UTF-8 |
92 | Statyczna biblioteka libvpx. | |
93 | ||
bccc9f86 | 94 | %prep |
1e757208 | 95 | #%setup -q -n %{name}-v%{version} |
5f38e725 | 96 | %setup -qc |
bccc9f86 AM |
97 | |
98 | %build | |
d5d82930 JB |
99 | install -d obj |
100 | cd obj | |
bccc9f86 | 101 | # not autoconf configure |
16ab9c5e | 102 | CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \ |
bccc9f86 | 103 | ../configure \ |
7b991969 | 104 | %if %{with asm} |
dcde509e | 105 | --as=yasm \ |
61956466 | 106 | %endif |
e1331b3a | 107 | --target=%{vpxtarget} \ |
6c7c0f8b | 108 | --enable-shared \ |
5f38e725 | 109 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 110 | --disable-optimizations \ |
2f397753 | 111 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ |
f0a288d6 ER |
112 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ |
113 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
bccc9f86 | 114 | --enable-vp8 \ |
44b37573 | 115 | %{!?with_vp9_encoder:--disable-vp9-encoder} \ |
bccc9f86 AM |
116 | --enable-postproc \ |
117 | --enable-runtime-cpu-detect | |
0257ab6e | 118 | |
0257ab6e | 119 | %{__make} verbose=true target=libs \ |
938aec6f | 120 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 121 | CC="%{__cc}" \ |
7fb20346 | 122 | LD="%{__cc}" \ |
6c7c0f8b | 123 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
124 | |
125 | %{__make} verbose=true target=examples \ | |
6c7c0f8b | 126 | CC="%{__cc}" \ |
7fb20346 | 127 | LD="%{__cc}" \ |
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 | |
1e757208 | 142 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3 |
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 |
1c3357c1 | 156 | %attr(755,root,root) %{_bindir}/vp8_scalable_patterns |
44b37573 | 157 | %{?with_vp9_encoder:%attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder} |
d5d82930 JB |
158 | %attr(755,root,root) %{_bindir}/vpxdec |
159 | %attr(755,root,root) %{_bindir}/vpxenc | |
47f853c3 | 160 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
1c3357c1 | 161 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.1 |
bccc9f86 AM |
162 | |
163 | %files devel | |
164 | %defattr(644,root,root,755) | |
47f853c3 | 165 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 166 | %{_includedir}/vpx |
9026bd8c | 167 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
168 | |
169 | %files static | |
170 | %defattr(644,root,root,755) | |
0257ab6e | 171 | %{_libdir}/libvpx.a |