6 # buggy, non PIC asm code
10 Summary: VP8, a high-quality video codec
16 Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
17 # Source0-md5: 9eb8e818d2f3263623c258fe66924082
18 Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
19 URL: http://www.webmproject.org/
20 BuildRequires: /usr/bin/php
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: doxygen
24 BuildRequires: php-pcre
25 %{?with_asm:BuildRequires: yasm}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 VP8, a high-quality video codec.
32 Summary: Header files and develpment documentation for libvpx
33 Group: Development/Libraries
34 Requires: %{name} = %{epoch}:%{version}-%{release}
37 Header files and documentation for libvpx.
40 Summary: Static libvpx library
41 Group: Development/Libraries
42 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
45 Static libvpx library.
54 # not autoconf configure
58 --target=x86_64-linux-gcc \
61 --target=x86-linux-gcc \
64 --target=generic-gnu \
67 --disable-optimizations \
70 --enable-runtime-cpu-detect
72 # Hack our optflags in.
73 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" {libs,examples,docs}-*.mk
74 sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk
76 %{__make} verbose=true target=libs \
79 %{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \
80 vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \
81 vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \
83 vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o \
87 # Temporarily dance the static libs out of the way
88 mv libvpx.a libNOTvpx.a
89 mv libvpx_g.a libNOTvpx_g.a
91 # We need to do this so the examples can link against it.
92 ln -sf libvpx.so.0.0.0 libvpx.so
94 %{__make} verbose=true target=examples \
96 %{__make} verbose=true target=docs
98 # Put them back so the install doesn't fail
99 mv libNOTvpx.a libvpx.a
100 mv libNOTvpx_g.a libvpx_g.a
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
107 %{__make} -C build install \
108 DIST_DIR=$(pwd)/outdir
110 mv outdir/bin/{simple_decoder,vp8_simple_decoder}
111 mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
112 install -p outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
114 ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
115 ln -s libvpx.so.0.0.0 build/libvpx.so.0
116 install -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
118 cp -a outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
119 cp -a outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
122 rm -rf $RPM_BUILD_ROOT
124 %post -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_bindir}/*
130 %attr(755,root,root) %{_libdir}/libvpx.so.*.*
131 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libvpx*.so
139 %defattr(644,root,root,755)