]>
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 |
aa7aed28 ER |
26 | Version: 1.4.0 |
27 | Release: 0.1 | |
bccc9f86 AM |
28 | License: BSD |
29 | Group: Libraries | |
aa7aed28 | 30 | # Source in git web, but regenerated on each fetch, so use gentoo tarball instead |
488ced65 | 31 | #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz |
aa7aed28 ER |
32 | Source0: http://distfiles.gentoo.org/distfiles/%{name}-%{version}.tar.bz2 |
33 | # Source0-md5: 63b1d7f59636a42eeeee9225cc14e7de | |
bccc9f86 | 34 | URL: http://www.webmproject.org/ |
a28e5963 | 35 | BuildRequires: doxygen |
71ced3dc | 36 | %{?with_tests:BuildRequires: libstdc++-devel} |
efdc9f5e | 37 | BuildRequires: pkgconfig |
a7d444e9 | 38 | BuildRequires: rpmbuild(macros) >= 1.673 |
9026bd8c | 39 | BuildRequires: sed >= 4.0 |
3c828a1d | 40 | %{?with_asm:BuildRequires: yasm >= 0.8} |
a7d444e9 ER |
41 | %if %{with doc} |
42 | BuildRequires: %{php_name}-pcre | |
43 | BuildRequires: %{php_name}-program | |
44 | %endif | |
bccc9f86 AM |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
e1331b3a ER |
47 | %define generic_target generic-gnu |
48 | %define vpxtarget %{generic_target} | |
49 | %ifarch %{x8664} | |
50 | %define vpxtarget x86_64-linux-gcc | |
51 | %endif | |
52 | %ifarch %{ix86} | |
53 | %define vpxtarget x86-linux-gcc | |
54 | %endif | |
55 | %ifarch ppc | |
56 | %define vpxtarget ppc32-linux-gcc | |
57 | %endif | |
58 | %ifarch ppc64 | |
59 | %define vpxtarget ppc64-linux-gcc | |
60 | %endif | |
61 | ||
bccc9f86 AM |
62 | %description |
63 | VP8, a high-quality video codec. | |
64 | ||
d5d82930 JB |
65 | %description -l pl.UTF-8 |
66 | VP8 - kodek obrazu wysokiej jakości. | |
67 | ||
bccc9f86 | 68 | %package devel |
d5d82930 JB |
69 | Summary: Header files for libvpx |
70 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 71 | Group: Development/Libraries |
d5d82930 | 72 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
73 | |
74 | %description devel | |
d5d82930 JB |
75 | Header files for libvpx library. |
76 | ||
77 | %description devel -l pl.UTF-8 | |
78 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
79 | |
80 | %package static | |
81 | Summary: Static libvpx library | |
d5d82930 | 82 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 83 | Group: Development/Libraries |
d5d82930 | 84 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
85 | |
86 | %description static | |
87 | Static libvpx library. | |
88 | ||
d5d82930 JB |
89 | %description static -l pl.UTF-8 |
90 | Statyczna biblioteka libvpx. | |
91 | ||
bccc9f86 | 92 | %prep |
aa7aed28 | 93 | %setup -q |
bccc9f86 AM |
94 | |
95 | %build | |
d5d82930 JB |
96 | install -d obj |
97 | cd obj | |
bccc9f86 | 98 | # not autoconf configure |
16ab9c5e | 99 | CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \ |
bccc9f86 | 100 | ../configure \ |
7b991969 | 101 | %if %{with asm} |
dcde509e | 102 | --as=yasm \ |
61956466 | 103 | %endif |
e1331b3a | 104 | --target=%{vpxtarget} \ |
6c7c0f8b | 105 | --enable-shared \ |
5f38e725 | 106 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 107 | --disable-optimizations \ |
2f397753 | 108 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ |
f0a288d6 ER |
109 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ |
110 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
bccc9f86 | 111 | --enable-vp8 \ |
44b37573 | 112 | %{!?with_vp9_encoder:--disable-vp9-encoder} \ |
bccc9f86 AM |
113 | --enable-postproc \ |
114 | --enable-runtime-cpu-detect | |
0257ab6e | 115 | |
0257ab6e | 116 | %{__make} verbose=true target=libs \ |
938aec6f | 117 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 118 | CC="%{__cc}" \ |
7fb20346 | 119 | LD="%{__cc}" \ |
6c7c0f8b | 120 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
121 | |
122 | %{__make} verbose=true target=examples \ | |
6c7c0f8b | 123 | CC="%{__cc}" \ |
7fb20346 | 124 | LD="%{__cc}" \ |
dcde509e | 125 | LDFLAGS="%{rpmldflags} -L." |
a7d444e9 ER |
126 | |
127 | %if %{with doc} | |
0257ab6e | 128 | %{__make} verbose=true target=docs |
a7d444e9 | 129 | %endif |
0257ab6e | 130 | |
bccc9f86 AM |
131 | %install |
132 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 133 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e | 134 | |
6c7c0f8b | 135 | %{__make} -C obj verbose=true install \ |
938aec6f ER |
136 | LIBSUBDIR=%{_lib} \ |
137 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
0257ab6e | 138 | |
aa7aed28 | 139 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.4 |
9026bd8c JB |
140 | |
141 | # adjust prefix and libdir | |
3c828a1d | 142 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
143 | |
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
2f397753 | 147 | %post -p /sbin/ldconfig |
bccc9f86 AM |
148 | %postun -p /sbin/ldconfig |
149 | ||
150 | %files | |
151 | %defattr(644,root,root,755) | |
d5d82930 | 152 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
1c3357c1 | 153 | %attr(755,root,root) %{_bindir}/vp8_scalable_patterns |
44b37573 | 154 | %{?with_vp9_encoder:%attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder} |
d5d82930 JB |
155 | %attr(755,root,root) %{_bindir}/vpxdec |
156 | %attr(755,root,root) %{_bindir}/vpxenc | |
47f853c3 | 157 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
1c3357c1 | 158 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.1 |
bccc9f86 AM |
159 | |
160 | %files devel | |
161 | %defattr(644,root,root,755) | |
47f853c3 | 162 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 163 | %{_includedir}/vpx |
9026bd8c | 164 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
165 | |
166 | %files static | |
167 | %defattr(644,root,root,755) | |
0257ab6e | 168 | %{_libdir}/libvpx.a |