]>
Commit | Line | Data |
---|---|---|
c9ee805b ER |
1 | # |
2 | # Conditional build: | |
d5d82930 | 3 | %bcond_without asm # x86 assembler |
5f38e725 ER |
4 | %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano) |
5 | ||
6 | %if "%{pld_release}" == "ac" | |
7 | # not supported by compiler | |
8 | %undefine with_ssse3 | |
9 | %endif | |
3c828a1d | 10 | |
bccc9f86 | 11 | Summary: VP8, a high-quality video codec |
d5d82930 | 12 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości |
bccc9f86 | 13 | Name: libvpx |
1e757208 | 14 | Version: 1.3.0 |
1c3357c1 | 15 | Release: 1 |
bccc9f86 AM |
16 | License: BSD |
17 | Group: Libraries | |
1e757208 JB |
18 | #Source0Download: http://code.google.com/p/webm/downloads/list |
19 | #Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 | |
488ced65 JB |
20 | # source, but regenerated on each fetch |
21 | #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz | |
22 | Source0: %{name}-%{version}.tar.gz | |
1e757208 | 23 | # Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729 |
bccc9f86 | 24 | URL: http://www.webmproject.org/ |
13542557 | 25 | BuildRequires: /usr/bin/php |
a28e5963 | 26 | BuildRequires: doxygen |
47f853c3 | 27 | BuildRequires: php-common >= 4:5.0.0 |
13542557 | 28 | BuildRequires: php-pcre |
9026bd8c | 29 | BuildRequires: sed >= 4.0 |
d5d82930 | 30 | %ifarch %{ix86} %{x8664} |
3c828a1d | 31 | %{?with_asm:BuildRequires: yasm >= 0.8} |
d5d82930 | 32 | %endif |
bccc9f86 AM |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
e1331b3a ER |
35 | %define generic_target generic-gnu |
36 | %define vpxtarget %{generic_target} | |
37 | %ifarch %{x8664} | |
38 | %define vpxtarget x86_64-linux-gcc | |
39 | %endif | |
40 | %ifarch %{ix86} | |
41 | %define vpxtarget x86-linux-gcc | |
42 | %endif | |
43 | %ifarch ppc | |
44 | %define vpxtarget ppc32-linux-gcc | |
45 | %endif | |
46 | %ifarch ppc64 | |
47 | %define vpxtarget ppc64-linux-gcc | |
48 | %endif | |
49 | ||
bccc9f86 AM |
50 | %description |
51 | VP8, a high-quality video codec. | |
52 | ||
d5d82930 JB |
53 | %description -l pl.UTF-8 |
54 | VP8 - kodek obrazu wysokiej jakości. | |
55 | ||
bccc9f86 | 56 | %package devel |
d5d82930 JB |
57 | Summary: Header files for libvpx |
58 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 59 | Group: Development/Libraries |
d5d82930 | 60 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
61 | |
62 | %description devel | |
d5d82930 JB |
63 | Header files for libvpx library. |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
67 | |
68 | %package static | |
69 | Summary: Static libvpx library | |
d5d82930 | 70 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 71 | Group: Development/Libraries |
d5d82930 | 72 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
73 | |
74 | %description static | |
75 | Static libvpx library. | |
76 | ||
d5d82930 JB |
77 | %description static -l pl.UTF-8 |
78 | Statyczna biblioteka libvpx. | |
79 | ||
bccc9f86 | 80 | %prep |
1e757208 | 81 | #%setup -q -n %{name}-v%{version} |
5f38e725 | 82 | %setup -qc |
bccc9f86 AM |
83 | |
84 | %build | |
d5d82930 JB |
85 | install -d obj |
86 | cd obj | |
bccc9f86 | 87 | # not autoconf configure |
d5d82930 | 88 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
bccc9f86 | 89 | ../configure \ |
7b991969 | 90 | %if %{with asm} |
dcde509e | 91 | --as=yasm \ |
61956466 | 92 | %endif |
e1331b3a ER |
93 | --target=%{vpxtarget} \ |
94 | %if "%{vpxtarget}" != "%{generic_target}" | |
6c7c0f8b | 95 | --enable-shared \ |
e1331b3a | 96 | %endif |
5f38e725 | 97 | %{!?with_ssse3:--disable-ssse3} \ |
0257ab6e | 98 | --disable-optimizations \ |
bccc9f86 AM |
99 | --enable-vp8 \ |
100 | --enable-postproc \ | |
101 | --enable-runtime-cpu-detect | |
0257ab6e | 102 | |
0257ab6e | 103 | %{__make} verbose=true target=libs \ |
938aec6f | 104 | HAVE_GNU_STRIP=no \ |
6c7c0f8b | 105 | CC="%{__cc}" \ |
7fb20346 | 106 | LD="%{__cc}" \ |
6c7c0f8b | 107 | LDFLAGS="%{rpmldflags}" |
0257ab6e AM |
108 | |
109 | %{__make} verbose=true target=examples \ | |
6c7c0f8b | 110 | CC="%{__cc}" \ |
7fb20346 | 111 | LD="%{__cc}" \ |
dcde509e | 112 | LDFLAGS="%{rpmldflags} -L." |
0257ab6e AM |
113 | %{__make} verbose=true target=docs |
114 | ||
bccc9f86 AM |
115 | %install |
116 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 117 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e | 118 | |
6c7c0f8b | 119 | %{__make} -C obj verbose=true install \ |
938aec6f ER |
120 | LIBSUBDIR=%{_lib} \ |
121 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
0257ab6e | 122 | |
1e757208 | 123 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3 |
9026bd8c JB |
124 | |
125 | # adjust prefix and libdir | |
3c828a1d | 126 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
127 | |
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post -p /sbin/ldconfig | |
132 | %postun -p /sbin/ldconfig | |
133 | ||
134 | %files | |
135 | %defattr(644,root,root,755) | |
d5d82930 | 136 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
1c3357c1 | 137 | %attr(755,root,root) %{_bindir}/vp8_scalable_patterns |
1e757208 | 138 | %attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder |
d5d82930 JB |
139 | %attr(755,root,root) %{_bindir}/vpxdec |
140 | %attr(755,root,root) %{_bindir}/vpxenc | |
47f853c3 | 141 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
1c3357c1 | 142 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.1 |
bccc9f86 AM |
143 | |
144 | %files devel | |
145 | %defattr(644,root,root,755) | |
47f853c3 | 146 | %attr(755,root,root) %{_libdir}/libvpx.so |
464fefd2 | 147 | %{_includedir}/vpx |
9026bd8c | 148 | %{_pkgconfigdir}/vpx.pc |
bccc9f86 AM |
149 | |
150 | %files static | |
151 | %defattr(644,root,root,755) | |
0257ab6e | 152 | %{_libdir}/libvpx.a |