]> git.pld-linux.org Git - packages/libgav1.git/blame - libgav1.spec
- try to skip tests unsupported on host CPU
[packages/libgav1.git] / libgav1.spec
CommitLineData
e2f5e4d6
JB
1#
2# Conditional build:
3%bcond_without tests # tests building
4
5Summary: AV1 decoder library (10-bit)
6Summary(pl.UTF-8): Biblioteka dekodera AV1 (10-bitowego)
7Name: libgav1
1f0fde20
JB
8Version: 0.18.0
9%define gitref 0fb779c1e169fe6c229cd1fa9cc6ea6feeb441da
10Release: 1
e2f5e4d6
JB
11License: Apache v2.0
12Group: Libraries
13#Source0Download: https://chromium.googlesource.com/codecs/libgav1
41ce00ae
JB
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
16Source0: %{name}-%{version}.tar.gz
1f0fde20 17# Source0-md5: 6d2e293afc30f7f0f7ea8cb472e0958b
e2f5e4d6 18Patch0: %{name}-system-libs.patch
98b51385 19Patch1: cxx17.patch
e2f5e4d6
JB
20URL: https://chromium.googlesource.com/codecs/libgav1
21BuildRequires: abseil-cpp-devel
22BuildRequires: cmake >= 3.7.1
23BuildRequires: gtest-devel
24BuildRequires: libstdc++-devel >= 6:5
25BuildRequires: rpmbuild(macros) >= 1.605
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29libgav1 is a Main profile (0) & High profile (1) compliant AV1
30decoder.
31
32%description -l pl.UTF-8
33libgav1 to dekoder AV1 zgodny z profilami Main (0) i High (1).
34
35%package devel
36Summary: Header files for libgav1 library
37Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgav1
38Group: Development/Libraries
39Requires: %{name} = %{version}-%{release}
40Requires: libstdc++-devel >= 6:5
41
42%description devel
43Header files for libgav1 library.
44
45%description devel -l pl.UTF-8
46Pliki nagłówkowe biblioteki libgav1.
47
48%package static
49Summary: Static libgav1 library
50Summary(pl.UTF-8): Statyczna biblioteka libgav1
51Group: Development/Libraries
52Requires: %{name}-devel = %{version}-%{release}
53
54%description static
55Static libgav1 library.
56
57%description static -l pl.UTF-8
58Statyczna biblioteka libgav1.
59
60%prep
61%setup -q -c
62%patch0 -p1
98b51385 63%patch1 -p1
e2f5e4d6
JB
64
65%build
66install -d build
67cd build
68%cmake .. \
69 -DCMAKE_INSTALL_BINDIR=bin \
70 -DCMAKE_INSTALL_DATAROOTDIR=share \
71 -DCMAKE_INSTALL_INCLUDEDIR=include \
72 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
73 %{!?with_tests:-DLIBGAV1_ENABLE_TESTS=OFF}
74
75%{__make}
76
77%if %{with tests}
78# how to execute all automatically?
79for f in $(echo ./*_test) ; do
8b2c0642
JB
80 if [ "$f" = "./common_avx2_test"] && ! grep -Fs avx2 ; then
81 continue
82 fi
83 if [ "$f" = "./common_sse4_test"] && ! grep -Fs sse4_1 ; then
84 continue
85 fi
e2f5e4d6
JB
86 $f
87done
88%endif
89
90%install
91rm -rf $RPM_BUILD_ROOT
92
93%{__make} -C build install \
94 DESTDIR=$RPM_BUILD_ROOT
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%post -p /sbin/ldconfig
100%postun -p /sbin/ldconfig
101
102%files
103%defattr(644,root,root,755)
104%doc AUTHORS README.md
105%attr(755,root,root) %{_bindir}/gav1_decode
106%attr(755,root,root) %{_libdir}/libgav1.so.*.*.*
1f0fde20 107%attr(755,root,root) %ghost %{_libdir}/libgav1.so.1
e2f5e4d6
JB
108
109%files devel
110%defattr(644,root,root,755)
111%attr(755,root,root) %{_libdir}/libgav1.so
112%{_includedir}/gav1
113%{_pkgconfigdir}/libgav1.pc
114%{_datadir}/cmake/libgav1-config.cmake
115
116%files static
117%defattr(644,root,root,755)
118%{_libdir}/libgav1.a
This page took 0.148502 seconds and 4 git commands to generate.