-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
rpm-oxide.spec.in
66 lines (53 loc) · 1.83 KB
/
rpm-oxide.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# The Qubes OS Project, https://www.qubes-os.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
Name: qubes-rpm-oxide
Version: @VERSION@
Release: 1%{dist}
Summary: RPM Canonicalization
Group: Qubes
Vendor: Invisible Things Lab
License: MIT OR Apache-2.0
URL: https://www.qubes-os.org
BuildRequires: rust >= 1.38
BuildRequires: cargo
BuildRequires: rpm-devel >= 4.14.2.1-4
BuildRequires: rust-debugger-common
BuildRequires: rust-cc-devel
BuildRequires: rust-libc-devel
%define qubes_cargo cargo '--config=source.system.directory="/usr/share/cargo/registry"' \\\
'--config=source.crates-io.replace-with="system"' \\\
--offline
Requires: rpm >= 4.14.2.1-4
Source0: %{name}-%{version}.tar.gz
%description
RPM canonicalization and verification tools
%prep
%setup -q
%build
%set_build_flags
%qubes_cargo build --all-features --release
%check
%set_build_flags
%qubes_cargo test --all-features --release
%install
install -D -m 0755 -- target/release/rpmcanon "$RPM_BUILD_ROOT"/%{_bindir}/rpmcanon
install -D -m 0755 -- target/release/sigparse "$RPM_BUILD_ROOT"/%{_bindir}/sigparse
%clean
rm -rf "$RPM_BUILD_ROOT"
%files
%attr(755,root,root) %{_bindir}/rpmcanon
%attr(755,root,root) %{_bindir}/sigparse
%changelog
@CHANGELOG@