]>
Commit | Line | Data |
---|---|---|
e2f5e4d6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # tests building | |
4 | ||
5 | Summary: AV1 decoder library (10-bit) | |
6 | Summary(pl.UTF-8): Biblioteka dekodera AV1 (10-bitowego) | |
7 | Name: libgav1 | |
1f0fde20 JB |
8 | Version: 0.18.0 |
9 | %define gitref 0fb779c1e169fe6c229cd1fa9cc6ea6feeb441da | |
10 | Release: 1 | |
e2f5e4d6 JB |
11 | License: Apache v2.0 |
12 | Group: 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 | |
16 | Source0: %{name}-%{version}.tar.gz | |
1f0fde20 | 17 | # Source0-md5: 6d2e293afc30f7f0f7ea8cb472e0958b |
e2f5e4d6 | 18 | Patch0: %{name}-system-libs.patch |
98b51385 | 19 | Patch1: cxx17.patch |
e2f5e4d6 JB |
20 | URL: https://chromium.googlesource.com/codecs/libgav1 |
21 | BuildRequires: abseil-cpp-devel | |
22 | BuildRequires: cmake >= 3.7.1 | |
23 | BuildRequires: gtest-devel | |
24 | BuildRequires: libstdc++-devel >= 6:5 | |
25 | BuildRequires: rpmbuild(macros) >= 1.605 | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | libgav1 is a Main profile (0) & High profile (1) compliant AV1 | |
30 | decoder. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | libgav1 to dekoder AV1 zgodny z profilami Main (0) i High (1). | |
34 | ||
35 | %package devel | |
36 | Summary: Header files for libgav1 library | |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgav1 | |
38 | Group: Development/Libraries | |
39 | Requires: %{name} = %{version}-%{release} | |
40 | Requires: libstdc++-devel >= 6:5 | |
41 | ||
42 | %description devel | |
43 | Header files for libgav1 library. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Pliki nagłówkowe biblioteki libgav1. | |
47 | ||
48 | %package static | |
49 | Summary: Static libgav1 library | |
50 | Summary(pl.UTF-8): Statyczna biblioteka libgav1 | |
51 | Group: Development/Libraries | |
52 | Requires: %{name}-devel = %{version}-%{release} | |
53 | ||
54 | %description static | |
55 | Static libgav1 library. | |
56 | ||
57 | %description static -l pl.UTF-8 | |
58 | Statyczna biblioteka libgav1. | |
59 | ||
60 | %prep | |
61 | %setup -q -c | |
62 | %patch0 -p1 | |
98b51385 | 63 | %patch1 -p1 |
e2f5e4d6 JB |
64 | |
65 | %build | |
66 | install -d build | |
67 | cd 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? | |
79 | for 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 |
87 | done | |
88 | %endif | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %{__make} -C build install \ | |
94 | DESTDIR=$RPM_BUILD_ROOT | |
95 | ||
96 | %clean | |
97 | rm -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 |