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