]>
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 | |
025171a3 | 10 | Release: 2 |
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 |
5aaa905b | 20 | Patch2: %{name}-sse4-tests.patch |
e2f5e4d6 JB |
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) | |
28 | ||
29 | %description | |
30 | libgav1 is a Main profile (0) & High profile (1) compliant AV1 | |
31 | decoder. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | libgav1 to dekoder AV1 zgodny z profilami Main (0) i High (1). | |
35 | ||
36 | %package devel | |
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 | |
42 | ||
43 | %description devel | |
44 | Header files for libgav1 library. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe biblioteki libgav1. | |
48 | ||
49 | %package static | |
50 | Summary: Static libgav1 library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka libgav1 | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static libgav1 library. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Statyczna biblioteka libgav1. | |
60 | ||
61 | %prep | |
62 | %setup -q -c | |
63 | %patch0 -p1 | |
98b51385 | 64 | %patch1 -p1 |
5aaa905b | 65 | %patch2 -p1 |
e2f5e4d6 JB |
66 | |
67 | %build | |
68 | install -d build | |
69 | cd build | |
70 | %cmake .. \ | |
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} | |
76 | ||
77 | %{__make} | |
78 | ||
79 | %if %{with tests} | |
80 | # how to execute all automatically? | |
81 | for f in $(echo ./*_test) ; do | |
5aaa905b | 82 | if [ "$f" = "./common_avx2_test" ] && ! grep -Fs avx2 /proc/cpuinfo ; then |
8b2c0642 JB |
83 | continue |
84 | fi | |
5aaa905b | 85 | if [ "$f" = "./common_sse4_test" ] && ! grep -Fs sse4_1 /proc/cpuinfo ; then |
8b2c0642 JB |
86 | continue |
87 | fi | |
e2f5e4d6 JB |
88 | $f |
89 | done | |
90 | %endif | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %{__make} -C build install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %post -p /sbin/ldconfig | |
102 | %postun -p /sbin/ldconfig | |
103 | ||
104 | %files | |
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.*.*.* | |
1f0fde20 | 109 | %attr(755,root,root) %ghost %{_libdir}/libgav1.so.1 |
e2f5e4d6 JB |
110 | |
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
113 | %attr(755,root,root) %{_libdir}/libgav1.so | |
114 | %{_includedir}/gav1 | |
115 | %{_pkgconfigdir}/libgav1.pc | |
116 | %{_datadir}/cmake/libgav1-config.cmake | |
117 | ||
118 | %files static | |
119 | %defattr(644,root,root,755) | |
120 | %{_libdir}/libgav1.a |