]>
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 |
5f38e725 ER |
5 | %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano) |
6 | ||
f2369026 ER |
7 | %ifnarch %{ix86} %{x8664} |
8 | %undefine with_asm | |
9 | %endif | |
10 | ||
5f38e725 ER |
11 | %if "%{pld_release}" == "ac" |
12 | # not supported by compiler | |
13 | %undefine with_ssse3 | |
14 | %endif | |
3c828a1d | 15 | |
bccc9f86 | 16 | Summary: VP8, a high-quality video codec |
d5d82930 | 17 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości |
bccc9f86 | 18 | Name: libvpx |
1e757208 | 19 | Version: 1.3.0 |
1c3357c1 | 20 | Release: 1 |
bccc9f86 AM |
21 | License: BSD |
22 | Group: Libraries | |
1e757208 JB |
23 | #Source0Download: http://code.google.com/p/webm/downloads/list |
24 | #Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 | |
488ced65 JB |
25 | # source, but regenerated on each fetch |
26 | #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz | |
27 | Source0: %{name}-%{version}.tar.gz | |
1e757208 | 28 | # Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729 |
bccc9f86 | 29 | URL: http://www.webmproject.org/ |
a28e5963 | 30 | BuildRequires: doxygen |
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 | ||
bccc9f86 | 85 | %prep |
1e757208 | 86 | #%setup -q -n %{name}-v%{version} |
5f38e725 | 87 | %setup -qc |
bccc9f86 AM |
88 | |
89 | %build | |
d5d82930 JB |
90 | install -d obj |
91 | cd obj | |
bccc9f86 | 92 | # not autoconf configure |
d5d82930 | 93 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
bccc9f86 | 94 | ../configure \ |
7b991969 | 95 | %if %{with asm} |
dcde509e | 96 | --as=yasm \ |
61956466 | 97 | %endif |
e1331b3a ER |
98 | --target=%{vpxtarget} \ |
99 | %if "%{vpxtarget}" != "%{generic_target}" | |
6c7c0f8b | 100 | --enable-shared \ |
e1331b3a | 101 | %endif |
5f38e725 | 102 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 103 | --disable-optimizations \ |
bccc9f86 AM |
104 | --enable-vp8 \ |
105 | --enable-postproc \ | |
106 | --enable-runtime-cpu-detect | |
0257ab6e | 107 | |
0257ab6e | 108 | %{__make} verbose=true target=libs \ |
938aec6f | 109 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 110 | CC="%{__cc}" \ |
7fb20346 | 111 | LD="%{__cc}" \ |
6c7c0f8b | 112 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
113 | |
114 | %{__make} verbose=true target=examples \ | |
6c7c0f8b | 115 | CC="%{__cc}" \ |
7fb20346 | 116 | LD="%{__cc}" \ |
dcde509e | 117 | LDFLAGS="%{rpmldflags} -L." |
a7d444e9 ER |
118 | |
119 | %if %{with doc} | |
0257ab6e | 120 | %{__make} verbose=true target=docs |
a7d444e9 | 121 | %endif |
0257ab6e | 122 | |
bccc9f86 AM |
123 | %install |
124 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 125 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e | 126 | |
6c7c0f8b | 127 | %{__make} -C obj verbose=true install \ |
938aec6f ER |
128 | LIBSUBDIR=%{_lib} \ |
129 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
0257ab6e | 130 | |
1e757208 | 131 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3 |
9026bd8c JB |
132 | |
133 | # adjust prefix and libdir | |
3c828a1d | 134 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
135 | |
136 | %clean | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %post -p /sbin/ldconfig | |
140 | %postun -p /sbin/ldconfig | |
141 | ||
142 | %files | |
143 | %defattr(644,root,root,755) | |
d5d82930 | 144 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
1c3357c1 | 145 | %attr(755,root,root) %{_bindir}/vp8_scalable_patterns |
1e757208 | 146 | %attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder |
d5d82930 JB |
147 | %attr(755,root,root) %{_bindir}/vpxdec |
148 | %attr(755,root,root) %{_bindir}/vpxenc | |
47f853c3 | 149 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
1c3357c1 | 150 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.1 |
bccc9f86 AM |
151 | |
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
47f853c3 | 154 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 155 | %{_includedir}/vpx |
9026bd8c | 156 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
157 | |
158 | %files static | |
159 | %defattr(644,root,root,755) | |
0257ab6e | 160 | %{_libdir}/libvpx.a |