]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
- build on x86
[packages/libvpx.git] / libvpx.spec
CommitLineData
bccc9f86
AM
1Summary: VP8, a high-quality video codec
2Name: libvpx
3Version: 0.9.0
4Release: 0.1
5License: BSD
6Group: Libraries
7Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
8# Source0-md5: 9eb8e818d2f3263623c258fe66924082
0257ab6e 9Patch0: %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
bccc9f86
AM
10URL: http://www.webmproject.org/
11BuildRequires: autoconf
12BuildRequires: automake
a28e5963 13BuildRequires: doxygen
a28e5963 14BuildRequires: yasm
bccc9f86
AM
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%description
18VP8, a high-quality video codec.
19
20%package devel
21Summary: Header files and develpment documentation for libvpx
22Group: Development/Libraries
23Requires: %{name} = %{epoch}:%{version}-%{release}
24
25%description devel
26Header files and documentation for libvpx.
27
28%package static
29Summary: Static libvpx library
30Group: Development/Libraries
31Requires: %{name}-devel = %{epoch}:%{version}-%{release}
32
33%description static
34Static libvpx library.
35
36%prep
37%setup -q
0257ab6e 38%patch0 -p1
bccc9f86
AM
39
40%build
41install -d build
42cd build
43# not autoconf configure
44../configure \
45%ifarch %{x8664}
46 --target=x86_64-linux-gcc \
47%endif
48%ifarch %{ix86}
49 --target=x86-linux-gcc \
50%endif
0257ab6e
AM
51 --enable-pic \
52 --disable-optimizations \
bccc9f86
AM
53 --enable-vp8 \
54 --enable-postproc \
55 --enable-runtime-cpu-detect
0257ab6e
AM
56
57# Hack our optflags in.
58sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" libs-*.mk
59sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" examples-*.mk
60sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{rpmcflags} %{rpmcppflags} -fPIC|g" docs-*.mk
61
62%{__make} verbose=true target=libs \
63 CC="%{__cc}"
64
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
69
70# Temporarily dance the static libs out of the way
71mv libvpx.a libNOTvpx.a
72mv libvpx_g.a libNOTvpx_g.a
73
74# We need to do this so the examples can link against it.
75ln -sf libvpx.so.0.0.0 libvpx.so
76
77%{__make} verbose=true target=examples \
78 CC="%{__cc}"
79%{__make} verbose=true target=docs
80
81# Put them back so the install doesn't fail
82mv libNOTvpx.a libvpx.a
83mv libNOTvpx_g.a libvpx_g.a
bccc9f86
AM
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
0257ab6e
AM
88install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
89
90install -d outdir
91%{__make} -C build install \
92 DIST_DIR=$(pwd)/outdir
93
94mv outdir/bin/{simple_decoder,vp8_simple_decoder}
95mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
96install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
97
98ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
99ln -s libvpx.so.0.0.0 build/libvpx.so.0
100install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
101ldconfig -X -n $RPM_BUILD_ROOT%{_libdir}
102
103install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}
104
105install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
bccc9f86
AM
106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%post -p /sbin/ldconfig
111%postun -p /sbin/ldconfig
112
113%files
114%defattr(644,root,root,755)
0257ab6e
AM
115%attr(755,root,root) %{_bindir}/*
116%attr(755,root,root) %{_libdir}/libvpx.so.*.*
117%attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
bccc9f86
AM
118
119%files devel
120%defattr(644,root,root,755)
121%attr(755,root,root) %{_libdir}/libvpx*.so
0257ab6e 122%{_includedir}/*.h
bccc9f86
AM
123
124%files static
125%defattr(644,root,root,755)
0257ab6e 126%{_libdir}/libvpx.a
This page took 0.083832 seconds and 4 git commands to generate.