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