1 Summary: VP8, a high-quality video codec
7 Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
8 # Source0-md5: 9eb8e818d2f3263623c258fe66924082
9 Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
10 URL: http://www.webmproject.org/
11 BuildRequires: autoconf
12 BuildRequires: automake
13 BuildRequires: doxygen
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 VP8, a high-quality video codec.
21 Summary: Header files and develpment documentation for libvpx
22 Group: Development/Libraries
23 Requires: %{name} = %{epoch}:%{version}-%{release}
26 Header files and documentation for libvpx.
29 Summary: Static libvpx library
30 Group: Development/Libraries
31 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
34 Static libvpx library.
43 # not autoconf configure
46 --target=x86_64-linux-gcc \
49 --target=x86-linux-gcc \
52 --disable-optimizations \
55 --enable-runtime-cpu-detect
57 # Hack our optflags in.
58 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" libs-*.mk
59 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" examples-*.mk
60 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" docs-*.mk
62 %{__make} verbose=true target=libs \
65 %{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \
66 vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \
67 vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \
68 vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o -lm -lpthread
70 # Temporarily dance the static libs out of the way
71 mv libvpx.a libNOTvpx.a
72 mv libvpx_g.a libNOTvpx_g.a
74 # We need to do this so the examples can link against it.
75 ln -sf libvpx.so.0.0.0 libvpx.so
77 %{__make} verbose=true target=examples \
79 %{__make} verbose=true target=docs
81 # Put them back so the install doesn't fail
82 mv libNOTvpx.a libvpx.a
83 mv libNOTvpx_g.a libvpx_g.a
86 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
91 %{__make} -C build install \
92 DIST_DIR=$(pwd)/outdir
94 mv outdir/bin/{simple_decoder,vp8_simple_decoder}
95 mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
96 install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
98 ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
99 ln -s libvpx.so.0.0.0 build/libvpx.so.0
100 install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
101 ldconfig -X -n $RPM_BUILD_ROOT%{_libdir}
103 install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}
105 install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
108 rm -rf $RPM_BUILD_ROOT
110 %post -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_bindir}/*
116 %attr(755,root,root) %{_libdir}/libvpx.so.*.*
117 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_libdir}/libvpx*.so
125 %defattr(644,root,root,755)