3 %bcond_without tests # tests building
5 Summary: AV1 decoder library (10-bit)
6 Summary(pl.UTF-8): Biblioteka dekodera AV1 (10-bitowego)
9 %define gitref 0fb779c1e169fe6c229cd1fa9cc6ea6feeb441da
13 #Source0Download: https://chromium.googlesource.com/codecs/libgav1
14 #Source0: https://chromium.googlesource.com/codecs/libgav1/+archive/%{gitref}.tar.gz?/%{name}-%{version}.tar.gz
15 # tarball is recreated on each download, so upload via dropin
16 Source0: %{name}-%{version}.tar.gz
17 # Source0-md5: 6d2e293afc30f7f0f7ea8cb472e0958b
18 Patch0: %{name}-system-libs.patch
20 Patch2: %{name}-sse4-tests.patch
21 URL: https://chromium.googlesource.com/codecs/libgav1
22 BuildRequires: abseil-cpp-devel
23 BuildRequires: cmake >= 3.7.1
24 BuildRequires: gtest-devel
25 BuildRequires: libstdc++-devel >= 6:5
26 BuildRequires: rpmbuild(macros) >= 1.605
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 libgav1 is a Main profile (0) & High profile (1) compliant AV1
33 %description -l pl.UTF-8
34 libgav1 to dekoder AV1 zgodny z profilami Main (0) i High (1).
37 Summary: Header files for libgav1 library
38 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgav1
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
41 Requires: libstdc++-devel >= 6:5
44 Header files for libgav1 library.
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki libgav1.
50 Summary: Static libgav1 library
51 Summary(pl.UTF-8): Statyczna biblioteka libgav1
52 Group: Development/Libraries
53 Requires: %{name}-devel = %{version}-%{release}
56 Static libgav1 library.
58 %description static -l pl.UTF-8
59 Statyczna biblioteka libgav1.
71 -DCMAKE_INSTALL_BINDIR=bin \
72 -DCMAKE_INSTALL_DATAROOTDIR=share \
73 -DCMAKE_INSTALL_INCLUDEDIR=include \
74 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
75 %{!?with_tests:-DLIBGAV1_ENABLE_TESTS=OFF}
80 # how to execute all automatically?
81 for f in $(echo ./*_test) ; do
82 if [ "$f" = "./common_avx2_test" ] && ! grep -Fs avx2 /proc/cpuinfo ; then
85 if [ "$f" = "./common_sse4_test" ] && ! grep -Fs sse4_1 /proc/cpuinfo ; then
93 rm -rf $RPM_BUILD_ROOT
95 %{__make} -C build install \
96 DESTDIR=$RPM_BUILD_ROOT
99 rm -rf $RPM_BUILD_ROOT
101 %post -p /sbin/ldconfig
102 %postun -p /sbin/ldconfig
105 %defattr(644,root,root,755)
106 %doc AUTHORS README.md
107 %attr(755,root,root) %{_bindir}/gav1_decode
108 %attr(755,root,root) %{_libdir}/libgav1.so.*.*.*
109 %attr(755,root,root) %ghost %{_libdir}/libgav1.so.1
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_libdir}/libgav1.so
115 %{_pkgconfigdir}/libgav1.pc
116 %{_datadir}/cmake/libgav1-config.cmake
119 %defattr(644,root,root,755)