]> git.pld-linux.org Git - packages/libvpx.git/blob - libvpx.spec
- drop broken manual shared linking and --enable-shared
[packages/libvpx.git] / libvpx.spec
1 #
2 # Conditional build:
3 %bcond_without  asm     # x86 assembler
4 #
5 Summary:        VP8, a high-quality video codec
6 Summary(pl.UTF-8):      VP8 - kodek obrazu wysokiej jakości
7 Name:           libvpx
8 Version:        0.9.5
9 Release:        2
10 License:        BSD
11 Group:          Libraries
12 #Source0-Download: http://code.google.com/p/webm/downloads/list
13 Source0:        http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
14 # Source0-md5:  4bf2f2c76700202c1fe9201fcb0680e3
15 Source1:        %{name}.ver
16 Patch0:         %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
17 URL:            http://www.webmproject.org/
18 BuildRequires:  /usr/bin/php
19 BuildRequires:  doxygen
20 BuildRequires:  php-common >= 4:5.0.0
21 BuildRequires:  php-pcre
22 %ifarch %{ix86} %{x8664}
23 %{?with_asm:BuildRequires:      yasm}
24 %endif
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 VP8, a high-quality video codec.
29
30 %description -l pl.UTF-8
31 VP8 - kodek obrazu wysokiej jakości.
32
33 %package devel
34 Summary:        Header files for libvpx
35 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libvpx
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38
39 %description devel
40 Header files for libvpx library.
41
42 %description devel -l pl.UTF-8
43 Pliki nagłówkowe biblioteki libvpx.
44
45 %package static
46 Summary:        Static libvpx library
47 Summary(pl.UTF-8):      Statyczna biblioteka libvpx
48 Group:          Development/Libraries
49 Requires:       %{name}-devel = %{version}-%{release}
50
51 %description static
52 Static libvpx library.
53
54 %description static -l pl.UTF-8
55 Statyczna biblioteka libvpx.
56
57 %prep
58 %setup -q -n %{name}-v%{version}
59 %patch0 -p1
60
61 %build
62 install -d obj
63 cd obj
64 # not autoconf configure
65 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
66 ../configure \
67 %if %{with asm}
68 %ifarch %{x8664}
69         --target=x86_64-linux-gcc \
70 %endif
71 %ifarch %{ix86}
72         --target=x86-linux-gcc \
73 %endif
74 %else
75         --target=generic-gnu \
76 %endif
77         --enable-shared \
78         --disable-optimizations \
79         --enable-vp8 \
80         --enable-postproc \
81         --enable-runtime-cpu-detect
82
83 # disable stripping
84 sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk
85
86 %{__make} verbose=true target=libs \
87         CC="%{__cc}" \
88         LDFLAGS="%{rpmldflags}"
89
90 %{__make} verbose=true target=examples \
91         CC="%{__cc}" \
92         LDFLAGS="%{rpmldflags}"
93 %{__make} verbose=true target=docs
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
98
99 install -d outdir
100 %{__make} -C obj verbose=true install \
101         DIST_DIR=$(pwd)/outdir
102
103 install -p outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
104 install -p obj/libvpx.so.* $RPM_BUILD_ROOT%{_libdir}
105 ln -s libvpx.so.0.9.5 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0
106 ln -s libvpx.so.0.9.5 $RPM_BUILD_ROOT%{_libdir}/libvpx.so
107
108 cp -a outdir/include/vpx/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
109 cp -a outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %post   -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
116
117 %files
118 %defattr(644,root,root,755)
119 %doc AUTHORS CHANGELOG LICENSE PATENTS README
120 %attr(755,root,root) %{_bindir}/vpxdec
121 %attr(755,root,root) %{_bindir}/vpxenc
122 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
123 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.0
124
125 %files devel
126 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_libdir}/libvpx.so
128 %{_includedir}/vpx
129
130 %files static
131 %defattr(644,root,root,755)
132 %{_libdir}/libvpx.a
This page took 0.038589 seconds and 3 git commands to generate.