]>
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 | |
8 | Version: 0.16.3 | |
9 | %define gitref ac9e35a6a5030fc8f26dcfde24ec8bc19ac12a94 | |
10 | Release: 1 | |
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 | |
e2f5e4d6 JB |
17 | # Source0-md5: e4147c91806c7786404ac493e67511dc |
18 | Patch0: %{name}-system-libs.patch | |
19 | URL: https://chromium.googlesource.com/codecs/libgav1 | |
20 | BuildRequires: abseil-cpp-devel | |
21 | BuildRequires: cmake >= 3.7.1 | |
22 | BuildRequires: gtest-devel | |
23 | BuildRequires: libstdc++-devel >= 6:5 | |
24 | BuildRequires: rpmbuild(macros) >= 1.605 | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | libgav1 is a Main profile (0) & High profile (1) compliant AV1 | |
29 | decoder. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | libgav1 to dekoder AV1 zgodny z profilami Main (0) i High (1). | |
33 | ||
34 | %package devel | |
35 | Summary: Header files for libgav1 library | |
36 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgav1 | |
37 | Group: Development/Libraries | |
38 | Requires: %{name} = %{version}-%{release} | |
39 | Requires: libstdc++-devel >= 6:5 | |
40 | ||
41 | %description devel | |
42 | Header files for libgav1 library. | |
43 | ||
44 | %description devel -l pl.UTF-8 | |
45 | Pliki nagłówkowe biblioteki libgav1. | |
46 | ||
47 | %package static | |
48 | Summary: Static libgav1 library | |
49 | Summary(pl.UTF-8): Statyczna biblioteka libgav1 | |
50 | Group: Development/Libraries | |
51 | Requires: %{name}-devel = %{version}-%{release} | |
52 | ||
53 | %description static | |
54 | Static libgav1 library. | |
55 | ||
56 | %description static -l pl.UTF-8 | |
57 | Statyczna biblioteka libgav1. | |
58 | ||
59 | %prep | |
60 | %setup -q -c | |
61 | %patch0 -p1 | |
62 | ||
63 | %build | |
64 | install -d build | |
65 | cd build | |
66 | %cmake .. \ | |
67 | -DCMAKE_INSTALL_BINDIR=bin \ | |
68 | -DCMAKE_INSTALL_DATAROOTDIR=share \ | |
69 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
70 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
71 | %{!?with_tests:-DLIBGAV1_ENABLE_TESTS=OFF} | |
72 | ||
73 | %{__make} | |
74 | ||
75 | %if %{with tests} | |
76 | # how to execute all automatically? | |
77 | for f in $(echo ./*_test) ; do | |
78 | $f | |
79 | done | |
80 | %endif | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %{__make} -C build install \ | |
86 | DESTDIR=$RPM_BUILD_ROOT | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %post -p /sbin/ldconfig | |
92 | %postun -p /sbin/ldconfig | |
93 | ||
94 | %files | |
95 | %defattr(644,root,root,755) | |
96 | %doc AUTHORS README.md | |
97 | %attr(755,root,root) %{_bindir}/gav1_decode | |
98 | %attr(755,root,root) %{_libdir}/libgav1.so.*.*.* | |
99 | %attr(755,root,root) %ghost %{_libdir}/libgav1.so.0 | |
100 | ||
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
103 | %attr(755,root,root) %{_libdir}/libgav1.so | |
104 | %{_includedir}/gav1 | |
105 | %{_pkgconfigdir}/libgav1.pc | |
106 | %{_datadir}/cmake/libgav1-config.cmake | |
107 | ||
108 | %files static | |
109 | %defattr(644,root,root,755) | |
110 | %{_libdir}/libgav1.a |