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