3 %bcond_without asm # x86 assembler
4 %bcond_without doc # don't build doc
5 %bcond_with tests # build tests (not useful, creates libgtest.a)
6 %bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano)
8 %ifnarch %{ix86} %{x8664} x32
12 %if "%{pld_release}" == "ac"
13 # not supported by compiler
17 Summary: VP8, a high-quality video codec
18 Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości
24 # original download URL: http://downloads.webmproject.org/releases/webm/index.html
25 # ...but use github mirror to get consistent tarballs
26 #Source0Download: https://github.com/webmproject/libvpx/releases
27 Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
28 # Source0-md5: 6dbccca688886c66a216d7e445525bce
29 URL: http://www.webmproject.org/
30 BuildRequires: doxygen
31 %{?with_tests:BuildRequires: libstdc++-devel}
32 BuildRequires: pkgconfig
33 BuildRequires: rpmbuild(macros) >= 1.673
34 BuildRequires: sed >= 4.0
35 %{?with_asm:BuildRequires: yasm >= 0.8}
37 BuildRequires: %{php_name}-pcre
38 BuildRequires: %{php_name}-program
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define generic_target generic-gnu
43 %define vpxtarget %{generic_target}
45 %define vpxtarget x86_64-linux-gcc
48 %define vpxtarget x86-linux-gcc
51 %define vpxtarget ppc32-linux-gcc
54 %define vpxtarget ppc64-linux-gcc
58 VP8, a high-quality video codec.
60 %description -l pl.UTF-8
61 VP8 - kodek obrazu wysokiej jakości.
64 Summary: Header files for libvpx
65 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Header files for libvpx library.
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki libvpx.
76 Summary: Static libvpx library
77 Summary(pl.UTF-8): Statyczna biblioteka libvpx
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{version}-%{release}
82 Static libvpx library.
84 %description static -l pl.UTF-8
85 Statyczna biblioteka libvpx.
88 Summary: VPX decoding/encoding tools
89 Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
90 Group: Applications/Graphics
91 Requires: %{name} = %{version}-%{release}
94 VPX decoding/encoding tools.
96 %description tools -l pl.UTF-8
97 Narzędzia do kodowania/dekodowania formatu VPX.
105 # not autoconf configure
108 CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \
113 --target=%{vpxtarget} \
115 %{!?with_ssse3:--disable-ssse3} \
116 --disable-optimizations \
117 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
118 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
119 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
123 --enable-runtime-cpu-detect
125 %{__make} verbose=true target=libs \
127 LDFLAGS="%{rpmldflags}"
129 %{__make} verbose=true target=examples \
130 LDFLAGS="%{rpmldflags} -L."
133 %{__make} verbose=true target=docs
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
140 %{__make} -C obj verbose=true install \
142 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
144 # redundant minor version symlink (not SONAME)
145 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.6.2
147 # adjust prefix and libdir
148 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
151 rm -rf $RPM_BUILD_ROOT
153 %post -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
157 %defattr(644,root,root,755)
158 %doc AUTHORS CHANGELOG LICENSE PATENTS README
159 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
160 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.6
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_libdir}/libvpx.so
166 %{_pkgconfigdir}/vpx.pc
169 %defattr(644,root,root,755)
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_bindir}/vpxdec
175 %attr(755,root,root) %{_bindir}/vpxenc