]>
Commit | Line | Data |
---|---|---|
e4691afb JB |
1 | Summary: Cargo subcommand to vendor all crates.io dependencies into a local directory |
2 | Summary(pl.UTF-8): Podpolecenie Cargo do wystawiania wszystkich zależności crates.io w lokalnym katalogu | |
3 | Name: cargo-vendor | |
4 | Version: 0.1.23 | |
5 | Release: 1 | |
6 | License: Apache v2.0 or MIT | |
7 | Group: Development/Tools | |
8 | #Source0Download: https://github.com/alexcrichton/cargo-vendor/releases | |
9 | Source0: https://github.com/alexcrichton/cargo-vendor/releases/download/%{version}/%{name}-src-%{version}.tar.gz | |
10 | # Source0-md5: 4c35b8f917b42c6fc600292d9779a84c | |
11 | URL: https://github.com/alexcrichton/cargo-vendor | |
12 | BuildRequires: cargo >= 0.33.0 | |
13 | BuildRequires: curl-devel | |
14 | BuildRequires: rust | |
15 | BuildRequires: openssl-devel | |
16 | BuildRequires: zlib-devel | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | This is a Cargo subcommand which vendors all crates.io dependencies | |
21 | into a local directory using Cargo's support for source replacement. | |
22 | ||
23 | %description -l pl.UTF-8 | |
24 | Ten pakiet zawiera podpolecenie Cargo, które wystawia wszystkie | |
25 | zależności crates.io w lokalnym katalogu przy użyciu obsługi | |
26 | zamienników źródeł w Cargo. | |
27 | ||
28 | %prep | |
29 | %setup -q -n %{name}-src-%{version} | |
30 | ||
31 | # use our offline registry | |
32 | export CARGO_HOME="$(pwd)/.cargo" | |
33 | ||
34 | mkdir -p "$CARGO_HOME" | |
35 | cat >.cargo/config <<EOF | |
36 | [source.crates-io] | |
37 | registry = 'https://github.com/rust-lang/crates.io-index' | |
38 | replace-with = 'vendored-sources' | |
39 | ||
40 | [source.vendored-sources] | |
41 | directory = '$PWD/vendor' | |
42 | EOF | |
43 | ||
44 | %build | |
45 | export CARGO_HOME="$(pwd)/.cargo" | |
46 | ||
47 | cargo -v build --release --frozen --features vendored-openssl | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | export CARGO_HOME="$(pwd)/.cargo" | |
52 | ||
53 | cargo -v install --frozen --root $RPM_BUILD_ROOT%{_prefix} | |
54 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates.toml | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
61 | %doc LICENSE-MIT README.md | |
62 | %attr(755,root,root) %{_bindir}/cargo-vendor |