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/tags
27 Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
28 # Source0-md5: 026bc289d916624dabdfd713c1c5b69a
29 URL: https://www.webmproject.org/
30 BuildRequires: doxygen
31 BuildRequires: libstdc++-devel
32 BuildRequires: perl-base
33 BuildRequires: pkgconfig
34 BuildRequires: rpmbuild(macros) >= 1.673
35 BuildRequires: sed >= 4.0
36 %{?with_asm:BuildRequires: yasm >= 0.8}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define generic_target generic-gnu
40 %define vpxtarget %{generic_target}
42 %define vpxtarget x86_64-linux-gcc
45 %define vpxtarget x86-linux-gcc
48 %define vpxtarget ppc32-linux-gcc
51 %define vpxtarget ppc64-linux-gcc
54 %define vpxtarget arm64-linux-gcc
57 %define vpxtarget armv7-linux-gcc
61 VP8, a high-quality video codec.
63 %description -l pl.UTF-8
64 VP8 - kodek obrazu wysokiej jakości.
67 Summary: Header files for libvpx
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 Header files for libvpx library.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki libvpx.
79 Summary: Static libvpx library
80 Summary(pl.UTF-8): Statyczna biblioteka libvpx
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Static libvpx library.
87 %description static -l pl.UTF-8
88 Statyczna biblioteka libvpx.
91 Summary: VPX decoding/encoding tools
92 Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
93 Group: Applications/Graphics
94 Requires: %{name} = %{version}-%{release}
97 VPX decoding/encoding tools.
99 %description tools -l pl.UTF-8
100 Narzędzia do kodowania/dekodowania formatu VPX.
108 # not autoconf configure
111 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
116 --target=%{vpxtarget} \
118 %{!?with_ssse3:--disable-ssse3} \
119 --disable-optimizations \
120 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
121 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
122 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
126 --enable-runtime-cpu-detect
128 %{__make} verbose=true target=libs \
130 LDFLAGS="%{rpmldflags}"
132 %{__make} verbose=true target=examples \
133 LDFLAGS="%{rpmldflags} -L."
136 %{__make} verbose=true target=docs
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
143 %{__make} -C obj verbose=true install \
145 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
147 # redundant minor version symlink (not SONAME)
148 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.9.0
150 # adjust prefix and libdir
151 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
154 rm -rf $RPM_BUILD_ROOT
156 %post -p /sbin/ldconfig
157 %postun -p /sbin/ldconfig
160 %defattr(644,root,root,755)
161 %doc AUTHORS CHANGELOG LICENSE PATENTS README
162 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
163 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.9
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libvpx.so
169 %{_pkgconfigdir}/vpx.pc
172 %defattr(644,root,root,755)
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/vpxdec
178 %attr(755,root,root) %{_bindir}/vpxenc