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