4 # buggy, non PIC asm code
8 Summary: VP8, a high-quality video codec
14 Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
15 # Source0-md5: 9eb8e818d2f3263623c258fe66924082
16 Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
17 URL: http://www.webmproject.org/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: doxygen
21 %{?with_asm:BuildRequires: yasm}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 VP8, a high-quality video codec.
28 Summary: Header files and develpment documentation for libvpx
29 Group: Development/Libraries
30 Requires: %{name} = %{epoch}:%{version}-%{release}
33 Header files and documentation for libvpx.
36 Summary: Static libvpx library
37 Group: Development/Libraries
38 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
41 Static libvpx library.
50 # not autoconf configure
54 --target=x86_64-linux-gcc \
57 --target=x86-linux-gcc \
60 --target=generic-gnu \
63 --disable-optimizations \
66 --enable-runtime-cpu-detect
68 # Hack our optflags in.
69 sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" {libs,examples,docs}-*.mk
70 sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk
72 %{__make} verbose=true target=libs \
75 %{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \
76 vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \
77 vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \
79 vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o \
83 # Temporarily dance the static libs out of the way
84 mv libvpx.a libNOTvpx.a
85 mv libvpx_g.a libNOTvpx_g.a
87 # We need to do this so the examples can link against it.
88 ln -sf libvpx.so.0.0.0 libvpx.so
90 %{__make} verbose=true target=examples \
92 %{__make} verbose=true target=docs
94 # Put them back so the install doesn't fail
95 mv libNOTvpx.a libvpx.a
96 mv libNOTvpx_g.a libvpx_g.a
99 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
104 %{__make} -C build install \
105 DIST_DIR=$(pwd)/outdir
107 mv outdir/bin/{simple_decoder,vp8_simple_decoder}
108 mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
109 install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
111 ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
112 ln -s libvpx.so.0.0.0 build/libvpx.so.0
113 install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
114 ldconfig -X -n $RPM_BUILD_ROOT%{_libdir}
116 install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
118 install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
121 rm -rf $RPM_BUILD_ROOT
123 %post -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
127 %defattr(644,root,root,755)
128 %attr(755,root,root) %{_bindir}/*
129 %attr(755,root,root) %{_libdir}/libvpx.so.*.*
130 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/libvpx*.so
138 %defattr(644,root,root,755)