]>
Commit | Line | Data |
---|---|---|
c9ee805b ER |
1 | # |
2 | # Conditional build: | |
d5d82930 JB |
3 | %bcond_without asm # x86 assembler |
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 |
946a004e | 8 | Version: 0.9.5 |
ac10c7c7 | 9 | Release: 1 |
bccc9f86 AM |
10 | License: BSD |
11 | Group: Libraries | |
d5d82930 | 12 | #Source0-Download: http://code.google.com/p/webm/downloads/list |
34eceac6 | 13 | Source0: http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 |
946a004e | 14 | # Source0-md5: 4bf2f2c76700202c1fe9201fcb0680e3 |
5cb65362 | 15 | Source1: %{name}.ver |
0257ab6e | 16 | Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch |
bccc9f86 | 17 | URL: http://www.webmproject.org/ |
13542557 | 18 | BuildRequires: /usr/bin/php |
a28e5963 | 19 | BuildRequires: doxygen |
47f853c3 | 20 | BuildRequires: php-common >= 4:5.0.0 |
13542557 | 21 | BuildRequires: php-pcre |
d5d82930 | 22 | %ifarch %{ix86} %{x8664} |
7b991969 | 23 | %{?with_asm:BuildRequires: yasm} |
d5d82930 | 24 | %endif |
bccc9f86 AM |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | VP8, a high-quality video codec. | |
29 | ||
d5d82930 JB |
30 | %description -l pl.UTF-8 |
31 | VP8 - kodek obrazu wysokiej jakości. | |
32 | ||
bccc9f86 | 33 | %package devel |
d5d82930 JB |
34 | Summary: Header files for libvpx |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
bccc9f86 | 36 | Group: Development/Libraries |
d5d82930 | 37 | Requires: %{name} = %{version}-%{release} |
bccc9f86 AM |
38 | |
39 | %description devel | |
d5d82930 JB |
40 | Header files for libvpx library. |
41 | ||
42 | %description devel -l pl.UTF-8 | |
43 | Pliki nagłówkowe biblioteki libvpx. | |
bccc9f86 AM |
44 | |
45 | %package static | |
46 | Summary: Static libvpx library | |
d5d82930 | 47 | Summary(pl.UTF-8): Statyczna biblioteka libvpx |
bccc9f86 | 48 | Group: Development/Libraries |
d5d82930 | 49 | Requires: %{name}-devel = %{version}-%{release} |
bccc9f86 AM |
50 | |
51 | %description static | |
52 | Static libvpx library. | |
53 | ||
d5d82930 JB |
54 | %description static -l pl.UTF-8 |
55 | Statyczna biblioteka libvpx. | |
56 | ||
bccc9f86 | 57 | %prep |
946a004e | 58 | %setup -q -n %{name}-v%{version} |
0257ab6e | 59 | %patch0 -p1 |
bccc9f86 AM |
60 | |
61 | %build | |
d5d82930 JB |
62 | install -d obj |
63 | cd obj | |
bccc9f86 | 64 | # not autoconf configure |
d5d82930 | 65 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
bccc9f86 | 66 | ../configure \ |
7b991969 | 67 | %if %{with asm} |
bccc9f86 AM |
68 | %ifarch %{x8664} |
69 | --target=x86_64-linux-gcc \ | |
70 | %endif | |
71 | %ifarch %{ix86} | |
72 | --target=x86-linux-gcc \ | |
7b991969 AM |
73 | %endif |
74 | %else | |
75 | --target=generic-gnu \ | |
bccc9f86 | 76 | %endif |
0257ab6e AM |
77 | --enable-pic \ |
78 | --disable-optimizations \ | |
bccc9f86 AM |
79 | --enable-vp8 \ |
80 | --enable-postproc \ | |
81 | --enable-runtime-cpu-detect | |
0257ab6e | 82 | |
d5d82930 | 83 | # disable stripping |
7b991969 | 84 | sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk |
0257ab6e AM |
85 | |
86 | %{__make} verbose=true target=libs \ | |
87 | CC="%{__cc}" | |
88 | ||
5cb65362 AM |
89 | mkdir tmp |
90 | cd tmp | |
91 | ar x ../libvpx_g.a | |
92 | cd .. | |
93 | %{__cc} %{rpmldflags} -fPIC -shared \ | |
94 | -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,%{SOURCE1} -Wl,-z,noexecstack \ | |
95 | -o libvpx.so.0.0.0 tmp/*.o \ | |
96 | -pthread -lm | |
97 | rm -rf tmp | |
0257ab6e AM |
98 | |
99 | # Temporarily dance the static libs out of the way | |
100 | mv libvpx.a libNOTvpx.a | |
101 | mv libvpx_g.a libNOTvpx_g.a | |
102 | ||
103 | # We need to do this so the examples can link against it. | |
104 | ln -sf libvpx.so.0.0.0 libvpx.so | |
105 | ||
106 | %{__make} verbose=true target=examples \ | |
107 | CC="%{__cc}" | |
108 | %{__make} verbose=true target=docs | |
109 | ||
110 | # Put them back so the install doesn't fail | |
111 | mv libNOTvpx.a libvpx.a | |
112 | mv libNOTvpx_g.a libvpx_g.a | |
bccc9f86 AM |
113 | |
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
464fefd2 | 116 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} |
0257ab6e AM |
117 | |
118 | install -d outdir | |
d5d82930 | 119 | %{__make} -C obj install \ |
0257ab6e AM |
120 | DIST_DIR=$(pwd)/outdir |
121 | ||
c9ee805b | 122 | install -p outdir/bin/* $RPM_BUILD_ROOT%{_bindir} |
d5d82930 | 123 | install -p obj/libvpx.so.* $RPM_BUILD_ROOT%{_libdir} |
47f853c3 ER |
124 | ln -s libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0 |
125 | ln -s libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so | |
0257ab6e | 126 | |
ac10c7c7 | 127 | cp -a outdir/include/vpx/*.h $RPM_BUILD_ROOT%{_includedir}/vpx |
c9ee805b | 128 | cp -a outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir} |
bccc9f86 AM |
129 | |
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %post -p /sbin/ldconfig | |
134 | %postun -p /sbin/ldconfig | |
135 | ||
136 | %files | |
137 | %defattr(644,root,root,755) | |
d5d82930 JB |
138 | %doc AUTHORS CHANGELOG LICENSE PATENTS README |
139 | %attr(755,root,root) %{_bindir}/vpxdec | |
140 | %attr(755,root,root) %{_bindir}/vpxenc | |
47f853c3 | 141 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* |
0257ab6e | 142 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0 |
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 |
bccc9f86 AM |
148 | |
149 | %files static | |
150 | %defattr(644,root,root,755) | |
0257ab6e | 151 | %{_libdir}/libvpx.a |