]> git.pld-linux.org Git - packages/rav1e.git/blob - rav1e.spec
c114a4077f917349fd7f5aac7c7db7e9b3ae45d0
[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 %define         features        --no-default-features --features "binaries signal_support"
33 %else
34 %define         target_opt      %{nil}
35 %define         features        %{nil}
36 %endif
37
38 %description
39 rav1e is an AV1 video encoder. It is designed to eventually cover all
40 use cases, though in its current form it is most suitable for cases
41 where libaom (the reference encoder) is too slow.
42
43 %description -l pl.UTF-8
44 rav1e to koder obrazu AV1. Jest projektowany, aby ewentualnie pokrywać
45 wszystkie przypadki użycia, ale w obecnej postaci nadaje się najlepiej
46 tam, gdzie libaom (koder referencyjny) jest zbyt wolny.
47
48 %package libs
49 Summary:        Shared rav1e library
50 Summary(pl.UTF-8):      Biblioteka współdzielona rav1e
51 Group:          Libraries
52
53 %description libs
54 Shared rav1e library.
55
56 %description libs -l pl.UTF-8
57 Biblioteka współdzielona rav1e.
58
59 %package devel
60 Summary:        Header files for rav1e library
61 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki rav1e
62 Group:          Development/Libraries
63 Requires:       %{name}-libs = %{version}-%{release}
64
65 %description devel
66 Header files for rav1e library.
67
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki rav1e.
70
71 %package static
72 Summary:        Static rav1e library
73 Summary(pl.UTF-8):      Statyczna biblioteka rav1e
74 Group:          Development/Libraries
75 Requires:       %{name}-devel = %{version}-%{release}
76
77 %description static
78 Static rav1e library.
79
80 %description static -l pl.UTF-8
81 Statyczna biblioteka rav1e.
82
83 %prep
84 %setup -q -b1
85
86 # use our offline registry
87 export CARGO_HOME="$(pwd)/.cargo"
88
89 mkdir -p "$CARGO_HOME"
90 cat >.cargo/config <<EOF
91 [source.crates-io]
92 replace-with = 'vendored-sources'
93
94 [source.vendored-sources]
95 directory = '$PWD/vendor'
96 EOF
97
98 %build
99 export CARGO_HOME="$(pwd)/.cargo"
100
101 cargo -v build --release --frozen %{target_opt} %{features}
102
103 cargo -v cbuild --release --frozen %{target_opt}
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 cargo -v install --frozen %{target_opt} %{features} \
109         --path . \
110         --root $RPM_BUILD_ROOT%{_prefix}
111
112 cargo -v cinstall --frozen --release %{target_opt} \
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
122 rm -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.065787 seconds and 2 git commands to generate.