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: 10cf85debdd07be719a35ca3bfb8ea64
29 URL: https://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}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define generic_target generic-gnu
39 %define vpxtarget %{generic_target}
41 %define vpxtarget x86_64-linux-gcc
44 %define vpxtarget x86-linux-gcc
47 %define vpxtarget ppc32-linux-gcc
50 %define vpxtarget ppc64-linux-gcc
53 %define vpxtarget arm64-linux-gcc
56 %define vpxtarget armv7-linux-gcc
60 VP8, a high-quality video codec.
62 %description -l pl.UTF-8
63 VP8 - kodek obrazu wysokiej jakości.
66 Summary: Header files for libvpx
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
72 Header files for libvpx library.
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe biblioteki libvpx.
78 Summary: Static libvpx library
79 Summary(pl.UTF-8): Statyczna biblioteka libvpx
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Static libvpx library.
86 %description static -l pl.UTF-8
87 Statyczna biblioteka libvpx.
90 Summary: VPX decoding/encoding tools
91 Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
92 Group: Applications/Graphics
93 Requires: %{name} = %{version}-%{release}
96 VPX decoding/encoding tools.
98 %description tools -l pl.UTF-8
99 Narzędzia do kodowania/dekodowania formatu VPX.
107 # not autoconf configure
110 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
115 --target=%{vpxtarget} \
117 %{!?with_ssse3:--disable-ssse3} \
118 --disable-optimizations \
119 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
120 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
121 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
125 --enable-runtime-cpu-detect
127 %{__make} verbose=true target=libs \
129 LDFLAGS="%{rpmldflags}"
131 %{__make} verbose=true target=examples \
132 LDFLAGS="%{rpmldflags} -L."
135 %{__make} verbose=true target=docs
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
142 %{__make} -C obj verbose=true install \
144 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
146 # redundant minor version symlink (not SONAME)
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.7.1
149 # adjust prefix and libdir
150 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
153 rm -rf $RPM_BUILD_ROOT
155 %post -p /sbin/ldconfig
156 %postun -p /sbin/ldconfig
159 %defattr(644,root,root,755)
160 %doc AUTHORS CHANGELOG LICENSE PATENTS README
161 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.7
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/libvpx.so
168 %{_pkgconfigdir}/vpx.pc
171 %defattr(644,root,root,755)
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_bindir}/vpxdec
177 %attr(755,root,root) %{_bindir}/vpxenc