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}
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 # Source in git web, but regenerated on each fetch, so use gentoo tarball instead
25 #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
26 Source0: http://distfiles.gentoo.org/distfiles/%{name}-%{version}.tar.bz2
27 # Source0-md5: 63b1d7f59636a42eeeee9225cc14e7de
28 URL: http://www.webmproject.org/
29 BuildRequires: doxygen
30 %{?with_tests:BuildRequires: libstdc++-devel}
31 BuildRequires: pkgconfig
32 BuildRequires: rpmbuild(macros) >= 1.673
33 BuildRequires: sed >= 4.0
34 %{?with_asm:BuildRequires: yasm >= 0.8}
36 BuildRequires: %{php_name}-pcre
37 BuildRequires: %{php_name}-program
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define generic_target generic-gnu
42 %define vpxtarget %{generic_target}
44 %define vpxtarget x86_64-linux-gcc
47 %define vpxtarget x86-linux-gcc
50 %define vpxtarget ppc32-linux-gcc
53 %define vpxtarget ppc64-linux-gcc
57 VP8, a high-quality video codec.
59 %description -l pl.UTF-8
60 VP8 - kodek obrazu wysokiej jakości.
63 Summary: Header files for libvpx
64 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
65 Group: Development/Libraries
66 Requires: %{name} = %{version}-%{release}
69 Header files for libvpx library.
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe biblioteki libvpx.
75 Summary: Static libvpx library
76 Summary(pl.UTF-8): Statyczna biblioteka libvpx
77 Group: Development/Libraries
78 Requires: %{name}-devel = %{version}-%{release}
81 Static libvpx library.
83 %description static -l pl.UTF-8
84 Statyczna biblioteka libvpx.
92 # not autoconf configure
95 CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \
100 --target=%{vpxtarget} \
102 %{!?with_ssse3:--disable-ssse3} \
103 --disable-optimizations \
104 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
105 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
106 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
110 --enable-runtime-cpu-detect
112 %{__make} verbose=true target=libs \
114 LDFLAGS="%{rpmldflags}"
116 %{__make} verbose=true target=examples \
117 LDFLAGS="%{rpmldflags} -L."
120 %{__make} verbose=true target=docs
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
127 %{__make} -C obj verbose=true install \
129 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
131 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.2.0
133 # adjust prefix and libdir
134 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
137 rm -rf $RPM_BUILD_ROOT
139 %post -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
143 %defattr(644,root,root,755)
144 %doc AUTHORS CHANGELOG LICENSE PATENTS README
145 %attr(755,root,root) %{_bindir}/vpxdec
146 %attr(755,root,root) %{_bindir}/vpxenc
147 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
148 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.2
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libvpx.so
154 %{_pkgconfigdir}/vpx.pc
157 %defattr(644,root,root,755)