3 %bcond_without clib # C library
5 # no working cargo-c on x32 currently
9 Summary: The fastest and safest AV1 encoder
10 Summary(pl.UTF-8): Najszybszy i najbezpieczniejszy koder AV1
16 #Source0Download: https://github.com/xiph/rav1e/releases
17 Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 9a20e7b39ed1033c0266948454adf425
19 # cd %{name}-%{version}
22 # tar cJf rav1e-crates-%{version}.tar.xz %{name}-%{version}/{vendor,Cargo.lock}
23 Source1: %{name}-crates-%{version}.tar.xz
24 # Source1-md5: 52ac263ee653ce41f05bf7c7b58df6b0
25 URL: https://github.com/xiph/rav1e
27 %{?with_clib:BuildRequires: cargo-c}
29 BuildRequires: nasm >= 2.14
31 BuildRequires: rust >= 1.51.0
33 #BuildRequires: aom-devel
34 #BuildRequires: dav1d-devel
35 ExclusiveArch: %{ix86} %{x8664} x32 aarch64
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define target_opt --target x86_64-unknown-linux-gnux32
40 %define features --no-default-features --features "binaries signal_support"
42 %define target_opt %{nil}
43 %define features %{nil}
47 rav1e is an AV1 video encoder. It is designed to eventually cover all
48 use cases, though in its current form it is most suitable for cases
49 where libaom (the reference encoder) is too slow.
51 %description -l pl.UTF-8
52 rav1e to koder obrazu AV1. Jest projektowany, aby ewentualnie pokrywać
53 wszystkie przypadki użycia, ale w obecnej postaci nadaje się najlepiej
54 tam, gdzie libaom (koder referencyjny) jest zbyt wolny.
57 Summary: Shared rav1e library
58 Summary(pl.UTF-8): Biblioteka współdzielona rav1e
64 %description libs -l pl.UTF-8
65 Biblioteka współdzielona rav1e.
68 Summary: Header files for rav1e library
69 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki rav1e
70 Group: Development/Libraries
71 Requires: %{name}-libs = %{version}-%{release}
74 Header files for rav1e library.
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki rav1e.
80 Summary: Static rav1e library
81 Summary(pl.UTF-8): Statyczna biblioteka rav1e
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
88 %description static -l pl.UTF-8
89 Statyczna biblioteka rav1e.
94 # use our offline registry
95 export CARGO_HOME="$(pwd)/.cargo"
97 mkdir -p "$CARGO_HOME"
98 cat >.cargo/config <<EOF
100 replace-with = 'vendored-sources'
102 [source.vendored-sources]
103 directory = '$PWD/vendor'
107 export CARGO_HOME="$(pwd)/.cargo"
109 cargo -v build --release --frozen %{target_opt} %{features}
112 cargo -v cbuild --release --frozen %{target_opt} \
113 --prefix %{_prefix} \
118 rm -rf $RPM_BUILD_ROOT
120 cargo -v install --frozen %{target_opt} %{features} \
122 --root $RPM_BUILD_ROOT%{_prefix}
125 cargo -v cinstall --frozen --release %{target_opt} \
126 --destdir $RPM_BUILD_ROOT \
127 --prefix %{_prefix} \
128 --bindir %{_bindir} \
129 --includedir %{_includedir} \
133 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
136 rm -rf $RPM_BUILD_ROOT
138 %post libs -p /sbin/ldconfig
139 %postun libs -p /sbin/ldconfig
142 %defattr(644,root,root,755)
143 %doc LICENSE PATENTS README.md
144 %attr(755,root,root) %{_bindir}/rav1e
148 %defattr(644,root,root,755)
149 %doc LICENSE PATENTS README.md doc/GLOSSARY.md
150 %attr(755,root,root) %{_libdir}/librav1e.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/librav1e.so.0
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/librav1e.so
157 %{_pkgconfigdir}/rav1e.pc
160 %defattr(644,root,root,755)
161 %{_libdir}/librav1e.a