]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
- do not package shared lib in devel, but symlink; rel 4
[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
7Version: 0.9.0
47f853c3 8Release: 4
bccc9f86
AM
9License: BSD
10Group: Libraries
11Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
12# Source0-md5: 9eb8e818d2f3263623c258fe66924082
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
109mv outdir/bin/{simple_decoder,vp8_simple_decoder}
110mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
c9ee805b 111install -p outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
0257ab6e 112
47f853c3
ER
113install -p build/libvpx.so.* $RPM_BUILD_ROOT%{_libdir}
114ln -s libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0
115ln -s libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so
0257ab6e 116
c9ee805b
ER
117cp -a outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
118cp -a outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
bccc9f86
AM
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%post -p /sbin/ldconfig
124%postun -p /sbin/ldconfig
125
126%files
127%defattr(644,root,root,755)
0257ab6e 128%attr(755,root,root) %{_bindir}/*
47f853c3 129%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
0257ab6e 130%attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
bccc9f86
AM
131
132%files devel
133%defattr(644,root,root,755)
47f853c3 134%attr(755,root,root) %{_libdir}/libvpx.so
464fefd2 135%{_includedir}/vpx
bccc9f86
AM
136
137%files static
138%defattr(644,root,root,755)
0257ab6e 139%{_libdir}/libvpx.a
This page took 0.07005 seconds and 4 git commands to generate.