]> git.pld-linux.org Git - packages/rav1e.git/blob - rav1e.spec
- try with x32
[packages/rav1e.git] / rav1e.spec
1 Summary:        The fastest and safest AV1 encoder
2 Summary(pl.UTF-8):      Najszybszy i najbezpieczniejszy koder AV1
3 Name:           rav1e
4 Version:        0.4.1
5 Release:        1
6 License:        BSD
7 Group:          Libraries
8 #Source0Download: https://github.com/xiph/rav1e/releases
9 Source0:        https://github.com/xiph/rav1e/archive/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5:  e9c3c833c33bcf1bbafbdf1dcc170e10
11 # cd %{name}-%{version}
12 # cargo vendor
13 # cd ..
14 # tar cJf rav1e-crates-%{version}.tar.xz %{name}-%{version}/{vendor,Cargo.lock}
15 Source1:        %{name}-crates-%{version}.tar.xz
16 # Source1-md5:  cb04c9255da1a4b5caca116652a7781e
17 URL:            https://github.com/xiph/rav1e
18 BuildRequires:  cargo
19 BuildRequires:  cargo-c
20 %ifarch %{x8664}
21 BuildRequires:  nasm
22 %endif
23 BuildRequires:  rust
24 # for tests only?
25 #BuildRequires: aom-devel
26 #BuildRequires: dav1d-devel
27 ExclusiveArch:  %{ix86} %{x8664} x32 aarch64
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %ifarch x32
31 %define         target_opt      --target x86_64-unknown-linux-gnux32
32 %else
33 %define         target_opt      %{nil}
34 %endif
35
36 %description
37 rav1e is an AV1 video encoder. It is designed to eventually cover all
38 use cases, though in its current form it is most suitable for cases
39 where libaom (the reference encoder) is too slow.
40
41 %description -l pl.UTF-8
42 rav1e to koder obrazu AV1. Jest projektowany, aby ewentualnie pokrywać
43 wszystkie przypadki użycia, ale w obecnej postaci nadaje się najlepiej
44 tam, gdzie libaom (koder referencyjny) jest zbyt wolny.
45
46 %package libs
47 Summary:        Shared rav1e library
48 Summary(pl.UTF-8):      Biblioteka współdzielona rav1e
49 Group:          Libraries
50
51 %description libs
52 Shared rav1e library.
53
54 %description libs -l pl.UTF-8
55 Biblioteka współdzielona rav1e.
56
57 %package devel
58 Summary:        Header files for rav1e library
59 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki rav1e
60 Group:          Development/Libraries
61 Requires:       %{name}-libs = %{version}-%{release}
62
63 %description devel
64 Header files for rav1e library.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki rav1e.
68
69 %package static
70 Summary:        Static rav1e library
71 Summary(pl.UTF-8):      Statyczna biblioteka rav1e
72 Group:          Development/Libraries
73 Requires:       %{name}-devel = %{version}-%{release}
74
75 %description static
76 Static rav1e library.
77
78 %description static -l pl.UTF-8
79 Statyczna biblioteka rav1e.
80
81 %prep
82 %setup -q -b1
83
84 # use our offline registry
85 export CARGO_HOME="$(pwd)/.cargo"
86
87 mkdir -p "$CARGO_HOME"
88 cat >.cargo/config <<EOF
89 [source.crates-io]
90 replace-with = 'vendored-sources'
91
92 [source.vendored-sources]
93 directory = '$PWD/vendor'
94 EOF
95
96 %build
97 export CARGO_HOME="$(pwd)/.cargo"
98
99 cargo -v build --release --frozen %{target_opt}
100
101 cargo -v cbuild --release --frozen %{target_opt}
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 cargo -v install --frozen --path %{target_opt} . --root $RPM_BUILD_ROOT%{_prefix}
107
108 cargo -v cinstall --frozen --release %{target_opt} \
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
118 rm -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.08353 seconds and 3 git commands to generate.