-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmoo.spec
More file actions
81 lines (66 loc) · 1.79 KB
/
smoo.spec
File metadata and controls
81 lines (66 loc) · 1.79 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
%bcond_without check
%bcond_without vendor
%global cargo_install_lib 0
%if %{with vendor}
%global _cargo_generate_buildrequires 0
%endif
Name: smoo
Version: 0.0.2_rc3
Release: %autorelease
Summary: Inverted USB mass-storage host/gadget utilities
License: GPL-3.0-only
URL: https://github.com/samcday/smoo
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: clang-devel
BuildRequires: pkgconfig(openssl)
%description
smoo provides both sides of an inverted USB mass-storage protocol: a gadget
implementation that serves block data over FunctionFS + ublk, and a host
implementation that drives it over USB.
%package gadget
Summary: smoo gadget CLI
Requires: %{name}%{?_isa}
%description gadget
Device-side CLI that exposes a smoo gadget backed by FunctionFS + ublk.
%package host
Summary: smoo host CLI
Requires: %{name}%{?_isa}
%description host
Host-side CLI that speaks the smoo USB protocol over rusb.
%prep
%autosetup -n %{name}-%{version} -p1
%if %{with vendor}
%{__cargo} vendor --locked --versioned-dirs vendor
%cargo_prep -v vendor
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%endif
%build
%cargo_build
%cargo_vendor_manifest
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
install -Dpm0755 target/rpm/smoo-gadget \
%{buildroot}%{_bindir}/smoo-gadget
install -Dpm0755 target/rpm/smoo-host \
%{buildroot}%{_bindir}/smoo-host
%if %{with check}
%check
%cargo_test
%endif
%files
%license LICENSE
%license LICENSE.dependencies
%license cargo-vendor.txt
%license crates/smoo-proto/LICENSE-MIT
%doc README.md
%files gadget
%{_bindir}/smoo-gadget
%files host
%{_bindir}/smoo-host
%changelog
%autochangelog