]> git.pld-linux.org Git - packages/rav1e.git/blame - rav1e.spec
- try with x32
[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
JB
30%ifarch x32
31%define target_opt --target x86_64-unknown-linux-gnux32
32%else
33%define target_opt %{nil}
34%endif
35
7d9459ec
JB
36%description
37rav1e is an AV1 video encoder. It is designed to eventually cover all
38use cases, though in its current form it is most suitable for cases
39where libaom (the reference encoder) is too slow.
40
41%description -l pl.UTF-8
42rav1e to koder obrazu AV1. Jest projektowany, aby ewentualnie pokrywać
43wszystkie przypadki użycia, ale w obecnej postaci nadaje się najlepiej
44tam, gdzie libaom (koder referencyjny) jest zbyt wolny.
45
46%package libs
47Summary: Shared rav1e library
48Summary(pl.UTF-8): Biblioteka współdzielona rav1e
49Group: Libraries
50
51%description libs
52Shared rav1e library.
53
54%description libs -l pl.UTF-8
55Biblioteka współdzielona rav1e.
56
57%package devel
58Summary: Header files for rav1e library
59Summary(pl.UTF-8): Pliki nagłówkowe biblioteki rav1e
60Group: Development/Libraries
61Requires: %{name}-libs = %{version}-%{release}
62
63%description devel
64Header files for rav1e library.
65
66%description devel -l pl.UTF-8
67Pliki nagłówkowe biblioteki rav1e.
68
69%package static
70Summary: Static rav1e library
71Summary(pl.UTF-8): Statyczna biblioteka rav1e
72Group: Development/Libraries
73Requires: %{name}-devel = %{version}-%{release}
74
75%description static
76Static rav1e library.
77
78%description static -l pl.UTF-8
79Statyczna biblioteka rav1e.
80
81%prep
82%setup -q -b1
83
84# use our offline registry
85export CARGO_HOME="$(pwd)/.cargo"
86
87mkdir -p "$CARGO_HOME"
88cat >.cargo/config <<EOF
89[source.crates-io]
90replace-with = 'vendored-sources'
91
92[source.vendored-sources]
93directory = '$PWD/vendor'
94EOF
95
96%build
97export CARGO_HOME="$(pwd)/.cargo"
98
b0a1271e 99cargo -v build --release --frozen %{target_opt}
7d9459ec 100
b0a1271e 101cargo -v cbuild --release --frozen %{target_opt}
7d9459ec
JB
102
103%install
104rm -rf $RPM_BUILD_ROOT
105
b0a1271e 106cargo -v install --frozen --path %{target_opt} . --root $RPM_BUILD_ROOT%{_prefix}
7d9459ec 107
b0a1271e 108cargo -v cinstall --frozen --release %{target_opt} \
7d9459ec
JB
109 --destdir $RPM_BUILD_ROOT \
110 --prefix %{_prefix} \
111 --bindir %{_bindir} \
112 --includedir %{_includedir} \
113 --libdir %{_libdir}
114
115%{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%post libs -p /sbin/ldconfig
121%postun libs -p /sbin/ldconfig
122
123%files
124%defattr(644,root,root,755)
125%doc LICENSE PATENTS README.md
126%attr(755,root,root) %{_bindir}/rav1e
127
128%files libs
129%defattr(644,root,root,755)
130%doc LICENSE PATENTS README.md doc/GLOSSARY.md
131%attr(755,root,root) %{_libdir}/librav1e.so.*.*.*
132%attr(755,root,root) %ghost %{_libdir}/librav1e.so.0
133
134%files devel
135%defattr(644,root,root,755)
136%attr(755,root,root) %{_libdir}/librav1e.so
137%{_includedir}/rav1e
138%{_pkgconfigdir}/rav1e.pc
139
140%files static
141%defattr(644,root,root,755)
142%{_libdir}/librav1e.a
This page took 0.097302 seconds and 4 git commands to generate.