]>
Commit | Line | Data |
---|---|---|
c9ee805b ER |
1 | # |
2 | # Conditional build: | |
94bc01fd JP |
3 | %bcond_without asm # x86 assembler |
4 | %bcond_without doc # don't build doc | |
5 | %bcond_with tests # build tests (not useful, creates libgtest.a) | |
6 | %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano) | |
7 | %bcond_without static_libs # static library | |
5f38e725 | 8 | |
30fcd8a5 | 9 | %ifnarch %{ix86} %{x8664} x32 |
f2369026 ER |
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 | |
bccc9f86 | 18 | Summary: VP8, a high-quality video codec |
d5d82930 | 19 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości |
bccc9f86 | 20 | Name: libvpx |
8d1f912b | 21 | Version: 1.14.0 |
f72703c1 | 22 | Release: 1 |
bccc9f86 AM |
23 | License: BSD |
24 | Group: Libraries | |
5d57f493 JB |
25 | # original download URL: http://downloads.webmproject.org/releases/webm/index.html |
26 | # ...but use github mirror to get consistent tarballs | |
6aeba968 | 27 | #Source0Download: https://github.com/webmproject/libvpx/tags |
5d57f493 | 28 | Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz |
8d1f912b | 29 | # Source0-md5: 026bc289d916624dabdfd713c1c5b69a |
a0961f7e | 30 | URL: https://www.webmproject.org/ |
a28e5963 | 31 | BuildRequires: doxygen |
d12dbc6e | 32 | BuildRequires: libstdc++-devel |
921c9835 | 33 | BuildRequires: perl-base |
efdc9f5e | 34 | BuildRequires: pkgconfig |
a7d444e9 | 35 | BuildRequires: rpmbuild(macros) >= 1.673 |
9026bd8c | 36 | BuildRequires: sed >= 4.0 |
3c828a1d | 37 | %{?with_asm:BuildRequires: yasm >= 0.8} |
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 | |
5ae03088 JP |
54 | %ifarch aarch64 |
55 | %define vpxtarget arm64-linux-gcc | |
56 | %endif | |
978085cf JP |
57 | %ifarch armv7hnl |
58 | %define vpxtarget armv7-linux-gcc | |
59 | %endif | |
e1331b3a | 60 | |
bccc9f86 AM |
61 | %description |
62 | VP8, a high-quality video codec. | |
63 | ||
d5d82930 JB |
64 | %description -l pl.UTF-8 |
65 | VP8 - kodek obrazu wysokiej jakości. | |
66 | ||
bccc9f86 | 67 | %package devel |
d5d82930 JB |
68 | Summary: Header files for libvpx |
69 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 70 | Group: Development/Libraries |
d5d82930 | 71 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
72 | |
73 | %description devel | |
d5d82930 JB |
74 | Header files for libvpx library. |
75 | ||
76 | %description devel -l pl.UTF-8 | |
77 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
78 | |
79 | %package static | |
80 | Summary: Static libvpx library | |
d5d82930 | 81 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 82 | Group: Development/Libraries |
d5d82930 | 83 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
84 | |
85 | %description static | |
86 | Static libvpx library. | |
87 | ||
d5d82930 JB |
88 | %description static -l pl.UTF-8 |
89 | Statyczna biblioteka libvpx. | |
90 | ||
59ff1590 JB |
91 | %package tools |
92 | Summary: VPX decoding/encoding tools | |
93 | Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX | |
94 | Group: Applications/Graphics | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description tools | |
98 | VPX decoding/encoding tools. | |
99 | ||
100 | %description tools -l pl.UTF-8 | |
101 | Narzędzia do kodowania/dekodowania formatu VPX. | |
102 | ||
bccc9f86 | 103 | %prep |
5df4ed4b | 104 | %setup -q |
bccc9f86 AM |
105 | |
106 | %build | |
d5d82930 JB |
107 | install -d obj |
108 | cd obj | |
bccc9f86 | 109 | # not autoconf configure |
2f02a711 JB |
110 | CC="%{__cc}" \ |
111 | CXX="%{__cxx}" \ | |
28316222 | 112 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
bccc9f86 | 113 | ../configure \ |
7b991969 | 114 | %if %{with asm} |
dcde509e | 115 | --as=yasm \ |
61956466 | 116 | %endif |
e1331b3a | 117 | --target=%{vpxtarget} \ |
6c7c0f8b | 118 | --enable-shared \ |
94bc01fd | 119 | %{!?with_static_libs:--disable-static} \ |
5f38e725 | 120 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 121 | --disable-optimizations \ |
2f397753 | 122 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ |
f0a288d6 ER |
123 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ |
124 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
bccc9f86 | 125 | --enable-vp8 \ |
2f02a711 | 126 | --enable-vp8 \ |
bccc9f86 AM |
127 | --enable-postproc \ |
128 | --enable-runtime-cpu-detect | |
0257ab6e | 129 | |
0257ab6e | 130 | %{__make} verbose=true target=libs \ |
938aec6f | 131 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 132 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
133 | |
134 | %{__make} verbose=true target=examples \ | |
dcde509e | 135 | LDFLAGS="%{rpmldflags} -L." |
a7d444e9 ER |
136 | |
137 | %if %{with doc} | |
0257ab6e | 138 | %{__make} verbose=true target=docs |
a7d444e9 | 139 | %endif |
0257ab6e | 140 | |
bccc9f86 AM |
141 | %install |
142 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 143 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e | 144 | |
6c7c0f8b | 145 | %{__make} -C obj verbose=true install \ |
938aec6f ER |
146 | LIBSUBDIR=%{_lib} \ |
147 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
0257ab6e | 148 | |
61c9fbe7 | 149 | # redundant minor version symlink (not SONAME) |
8d1f912b | 150 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.9.0 |
9026bd8c JB |
151 | |
152 | # adjust prefix and libdir | |
3c828a1d | 153 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
2f397753 | 158 | %post -p /sbin/ldconfig |
bccc9f86 AM |
159 | %postun -p /sbin/ldconfig |
160 | ||
161 | %files | |
162 | %defattr(644,root,root,755) | |
d5d82930 | 163 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
47f853c3 | 164 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
8d1f912b | 165 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.9 |
bccc9f86 AM |
166 | |
167 | %files devel | |
168 | %defattr(644,root,root,755) | |
47f853c3 | 169 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 170 | %{_includedir}/vpx |
9026bd8c | 171 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 | 172 | |
94bc01fd | 173 | %if %{with static_libs} |
bccc9f86 AM |
174 | %files static |
175 | %defattr(644,root,root,755) | |
0257ab6e | 176 | %{_libdir}/libvpx.a |
94bc01fd | 177 | %endif |
59ff1590 JB |
178 | |
179 | %files tools | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{_bindir}/vpxdec | |
182 | %attr(755,root,root) %{_bindir}/vpxenc |