2 Summary: VP8, a high-quality video codec
8 Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
9 # Source0-md5: 9eb8e818d2f3263623c258fe66924082
10 Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
11 URL: http://www.webmproject.org/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRequires: doxygen
15 %{?with_asm:BuildRequires: yasm}
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 VP8, a high-quality video codec.
22 Summary: Header files and develpment documentation for libvpx
23 Group: Development/Libraries
24 Requires: %{name} = %{epoch}:%{version}-%{release}
27 Header files and documentation for libvpx.
30 Summary: Static libvpx library
31 Group: Development/Libraries
32 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
35 Static libvpx library.
44 # not autoconf configure
48 --target=x86_64-linux-gcc \
51 --target=x86-linux-gcc \
54 --target=generic-gnu \
57 --disable-optimizations \
60 --enable-runtime-cpu-detect
62 # Hack our optflags in.
63 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" {libs,examples,docs}-*.mk
64 sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk
66 %{__make} verbose=true target=libs \
69 %{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \
70 vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \
71 vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \
73 vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o \
77 # Temporarily dance the static libs out of the way
78 mv libvpx.a libNOTvpx.a
79 mv libvpx_g.a libNOTvpx_g.a
81 # We need to do this so the examples can link against it.
82 ln -sf libvpx.so.0.0.0 libvpx.so
84 %{__make} verbose=true target=examples \
86 %{__make} verbose=true target=docs
88 # Put them back so the install doesn't fail
89 mv libNOTvpx.a libvpx.a
90 mv libNOTvpx_g.a libvpx_g.a
93 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
98 %{__make} -C build install \
99 DIST_DIR=$(pwd)/outdir
101 mv outdir/bin/{simple_decoder,vp8_simple_decoder}
102 mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
103 install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
105 ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
106 ln -s libvpx.so.0.0.0 build/libvpx.so.0
107 install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
108 ldconfig -X -n $RPM_BUILD_ROOT%{_libdir}
110 install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
112 install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
115 rm -rf $RPM_BUILD_ROOT
117 %post -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_bindir}/*
123 %attr(755,root,root) %{_libdir}/libvpx.so.*.*
124 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
127 %defattr(644,root,root,755)
128 %attr(755,root,root) %{_libdir}/libvpx*.so
132 %defattr(644,root,root,755)