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)
7 %bcond_without static_libs # static library
9 %ifnarch %{ix86} %{x8664} x32
13 %if "%{pld_release}" == "ac"
14 # not supported by compiler
18 Summary: VP8, a high-quality video codec
19 Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości
25 # original download URL: http://downloads.webmproject.org/releases/webm/index.html
26 # ...but use github mirror to get consistent tarballs
27 #Source0Download: https://github.com/webmproject/libvpx/tags
28 Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
29 # Source0-md5: 026bc289d916624dabdfd713c1c5b69a
30 URL: https://www.webmproject.org/
31 BuildRequires: doxygen
32 BuildRequires: libstdc++-devel
33 BuildRequires: perl-base
34 BuildRequires: pkgconfig
35 BuildRequires: rpmbuild(macros) >= 1.673
36 BuildRequires: sed >= 4.0
37 %{?with_asm:BuildRequires: yasm >= 0.8}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define generic_target generic-gnu
41 %define vpxtarget %{generic_target}
43 %define vpxtarget x86_64-linux-gcc
46 %define vpxtarget x86-linux-gcc
49 %define vpxtarget ppc32-linux-gcc
52 %define vpxtarget ppc64-linux-gcc
55 %define vpxtarget arm64-linux-gcc
58 %define vpxtarget armv7-linux-gcc
62 VP8, a high-quality video codec.
64 %description -l pl.UTF-8
65 VP8 - kodek obrazu wysokiej jakości.
68 Summary: Header files for libvpx
69 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
74 Header files for libvpx library.
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki libvpx.
80 Summary: Static libvpx library
81 Summary(pl.UTF-8): Statyczna biblioteka libvpx
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 Static libvpx library.
88 %description static -l pl.UTF-8
89 Statyczna biblioteka libvpx.
92 Summary: VPX decoding/encoding tools
93 Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
94 Group: Applications/Graphics
95 Requires: %{name} = %{version}-%{release}
98 VPX decoding/encoding tools.
100 %description tools -l pl.UTF-8
101 Narzędzia do kodowania/dekodowania formatu VPX.
109 # not autoconf configure
112 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
117 --target=%{vpxtarget} \
119 %{!?with_static_libs:--disable-static} \
120 %{!?with_ssse3:--disable-ssse3} \
121 --disable-optimizations \
122 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
123 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
124 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
128 --enable-runtime-cpu-detect
130 %{__make} verbose=true target=libs \
132 LDFLAGS="%{rpmldflags}"
134 %{__make} verbose=true target=examples \
135 LDFLAGS="%{rpmldflags} -L."
138 %{__make} verbose=true target=docs
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
145 %{__make} -C obj verbose=true install \
147 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
149 # redundant minor version symlink (not SONAME)
150 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.9.0
152 # adjust prefix and libdir
153 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
156 rm -rf $RPM_BUILD_ROOT
158 %post -p /sbin/ldconfig
159 %postun -p /sbin/ldconfig
162 %defattr(644,root,root,755)
163 %doc AUTHORS CHANGELOG LICENSE PATENTS README
164 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
165 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.9
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libvpx.so
171 %{_pkgconfigdir}/vpx.pc
173 %if %{with static_libs}
175 %defattr(644,root,root,755)
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_bindir}/vpxdec
182 %attr(755,root,root) %{_bindir}/vpxenc