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