]>
Commit | Line | Data |
---|---|---|
7a1be2c9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static library | |
5 | # | |
6 | Summary: AV1 decoder library | |
7 | Summary(pl.UTF-8): Biblioteka dekodera AV1 | |
8 | Name: dav1d | |
319a975c | 9 | Version: 0.5.1 |
c32387d4 | 10 | Release: 1 |
7a1be2c9 JB |
11 | License: BSD |
12 | Group: Libraries | |
13 | Source0: https://download.videolan.org/videolan/dav1d/%{version}/%{name}-%{version}.tar.xz | |
319a975c | 14 | # Source0-md5: 858d62190141c7ceaae0e767a196fcc9 |
0ac586e3 | 15 | Patch0: %{name}-nasm.patch |
7a1be2c9 | 16 | URL: https://code.videolan.org/videolan/dav1d |
7a1be2c9 | 17 | %{?with_apidocs:BuildRequires: doxygen} |
73ac9645 | 18 | BuildRequires: meson >= 0.47.0 |
319a975c JB |
19 | %ifarch %{ix86} %{x8664} x32 |
20 | BuildRequires: nasm >= 2.13.02 | |
21 | %endif | |
73ac9645 | 22 | BuildRequires: ninja >= 1.5 |
7a1be2c9 JB |
23 | BuildRequires: pkgconfig |
24 | BuildRequires: rpmbuild(macros) >= 1.736 | |
25 | BuildRequires: tar >= 1:1.22 | |
26 | BuildRequires: xz | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | dav1d is a new AV1 cross-platform decoder, open-source, and focused on | |
31 | speed and correctness. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | dav1d to nowy, wieloplatformowy dekoder AV1, mający otwarte źródła, | |
35 | rozwijany głównie z myślą o szybkości i poprawności. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for DAV1D library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki DAV1D | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
7a1be2c9 JB |
42 | |
43 | %description devel | |
44 | Header files for DAV1D library. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe biblioteki DAV1D. | |
48 | ||
49 | %package static | |
50 | Summary: Static DAV1D library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka DAV1D | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static DAV1D library. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Statyczna biblioteka DAV1D. | |
60 | ||
61 | %package apidocs | |
62 | Summary: API documentation for DAV1D library | |
63 | Summary(pl.UTF-8): Dokumentacja API biblioteki DAV1D | |
64 | Group: Documentation | |
65 | ||
66 | %description apidocs | |
67 | API documentation for DAV1D library. | |
68 | ||
69 | %description apidocs -l pl.UTF-8 | |
70 | Dokumentacja API biblioteki DAV1D. | |
71 | ||
72 | %prep | |
73 | %setup -q | |
0ac586e3 | 74 | %patch0 -p1 |
7a1be2c9 JB |
75 | |
76 | %build | |
77 | %meson build \ | |
78 | %{!?with_static_libs:--default-library=shared} | |
79 | ||
80 | %ninja_build -C build all %{?with_apidocs:doc/html} | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %ninja_install -C build | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post -p /sbin/ldconfig | |
91 | %postun -p /sbin/ldconfig | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc COPYING NEWS README.md THANKS.md doc/PATENTS | |
96 | %attr(755,root,root) %{_bindir}/dav1d | |
97 | %attr(755,root,root) %{_libdir}/libdav1d.so.*.*.* | |
319a975c | 98 | %attr(755,root,root) %ghost %{_libdir}/libdav1d.so.3 |
7a1be2c9 JB |
99 | |
100 | %files devel | |
101 | %defattr(644,root,root,755) | |
102 | %attr(755,root,root) %{_libdir}/libdav1d.so | |
103 | %{_includedir}/dav1d | |
104 | %{_pkgconfigdir}/dav1d.pc | |
105 | ||
106 | %if %{with static_libs} | |
107 | %files static | |
108 | %defattr(644,root,root,755) | |
109 | %{_libdir}/libdav1d.a | |
110 | %endif | |
111 | ||
112 | %if %{with apidocs} | |
113 | %files apidocs | |
114 | %defattr(644,root,root,755) | |
115 | %doc build/doc/html/* | |
116 | %endif |