]> git.pld-linux.org Git - packages/rav1e.git/blame - rav1e.spec
- no features flags for cargo-c
[packages/rav1e.git] / rav1e.spec
CommitLineData
7d9459ec
JB
1Summary: The fastest and safest AV1 encoder
2Summary(pl.UTF-8): Najszybszy i najbezpieczniejszy koder AV1
3Name: rav1e
64f6d1ea 4Version: 0.4.1
7d9459ec
JB
5Release: 1
6License: BSD
7Group: Libraries
8#Source0Download: https://github.com/xiph/rav1e/releases
9Source0: https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz
64f6d1ea 10# Source0-md5: e9c3c833c33bcf1bbafbdf1dcc170e10
7d9459ec
JB
11# cd %{name}-%{version}
12# cargo vendor
13# cd ..
14# tar cJf rav1e-crates-%{version}.tar.xz %{name}-%{version}/{vendor,Cargo.lock}
15Source1: %{name}-crates-%{version}.tar.xz
64f6d1ea 16# Source1-md5: cb04c9255da1a4b5caca116652a7781e
7d9459ec
JB
17URL: https://github.com/xiph/rav1e
18BuildRequires: cargo
19BuildRequires: cargo-c
20%ifarch %{x8664}
21BuildRequires: nasm
22%endif
23BuildRequires: rust
24# for tests only?
25#BuildRequires: aom-devel
26#BuildRequires: dav1d-devel
b0a1271e 27ExclusiveArch: %{ix86} %{x8664} x32 aarch64
7d9459ec
JB
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
b0a1271e 30%ifarch x32
949174c2
JB
31%define target_opt --target x86_64-unknown-linux-gnux32
32%define features --no-default-features --features "binaries signal_support"
b0a1271e
JB
33%else
34%define target_opt %{nil}
949174c2 35%define features %{nil}
b0a1271e
JB
36%endif
37
7d9459ec
JB
38%description
39rav1e is an AV1 video encoder. It is designed to eventually cover all
40use cases, though in its current form it is most suitable for cases
41where libaom (the reference encoder) is too slow.
42
43%description -l pl.UTF-8
44rav1e to koder obrazu AV1. Jest projektowany, aby ewentualnie pokrywać
45wszystkie przypadki użycia, ale w obecnej postaci nadaje się najlepiej
46tam, gdzie libaom (koder referencyjny) jest zbyt wolny.
47
48%package libs
49Summary: Shared rav1e library
50Summary(pl.UTF-8): Biblioteka współdzielona rav1e
51Group: Libraries
52
53%description libs
54Shared rav1e library.
55
56%description libs -l pl.UTF-8
57Biblioteka współdzielona rav1e.
58
59%package devel
60Summary: Header files for rav1e library
61Summary(pl.UTF-8): Pliki nagłówkowe biblioteki rav1e
62Group: Development/Libraries
63Requires: %{name}-libs = %{version}-%{release}
64
65%description devel
66Header files for rav1e library.
67
68%description devel -l pl.UTF-8
69Pliki nagłówkowe biblioteki rav1e.
70
71%package static
72Summary: Static rav1e library
73Summary(pl.UTF-8): Statyczna biblioteka rav1e
74Group: Development/Libraries
75Requires: %{name}-devel = %{version}-%{release}
76
77%description static
78Static rav1e library.
79
80%description static -l pl.UTF-8
81Statyczna biblioteka rav1e.
82
83%prep
84%setup -q -b1
85
86# use our offline registry
87export CARGO_HOME="$(pwd)/.cargo"
88
89mkdir -p "$CARGO_HOME"
90cat >.cargo/config <<EOF
91[source.crates-io]
92replace-with = 'vendored-sources'
93
94[source.vendored-sources]
95directory = '$PWD/vendor'
96EOF
97
98%build
99export CARGO_HOME="$(pwd)/.cargo"
100
949174c2 101cargo -v build --release --frozen %{target_opt} %{features}
7d9459ec 102
b0a1271e 103cargo -v cbuild --release --frozen %{target_opt}
7d9459ec
JB
104
105%install
106rm -rf $RPM_BUILD_ROOT
107
949174c2
JB
108cargo -v install --frozen %{target_opt} %{features} \
109 --path . \
110 --root $RPM_BUILD_ROOT%{_prefix}
7d9459ec 111
b0a1271e 112cargo -v cinstall --frozen --release %{target_opt} \
7d9459ec
JB
113 --destdir $RPM_BUILD_ROOT \
114 --prefix %{_prefix} \
115 --bindir %{_bindir} \
116 --includedir %{_includedir} \
117 --libdir %{_libdir}
118
119%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
120
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%post libs -p /sbin/ldconfig
125%postun libs -p /sbin/ldconfig
126
127%files
128%defattr(644,root,root,755)
129%doc LICENSE PATENTS README.md
130%attr(755,root,root) %{_bindir}/rav1e
131
132%files libs
133%defattr(644,root,root,755)
134%doc LICENSE PATENTS README.md doc/GLOSSARY.md
135%attr(755,root,root) %{_libdir}/librav1e.so.*.*.*
136%attr(755,root,root) %ghost %{_libdir}/librav1e.so.0
137
138%files devel
139%defattr(644,root,root,755)
140%attr(755,root,root) %{_libdir}/librav1e.so
141%{_includedir}/rav1e
142%{_pkgconfigdir}/rav1e.pc
143
144%files static
145%defattr(644,root,root,755)
146%{_libdir}/librav1e.a
This page took 0.164642 seconds and 4 git commands to generate.