Accepting request 734414 from home:luke_nukem:branches:utilities

- Use `pwd`/.cargo for vendor config so that CARGO_HOME export is
  not required.

OBS-URL: https://build.opensuse.org/request/show/734414
OBS-URL: https://build.opensuse.org/package/show/utilities/bat?expand=0&rev=13
This commit is contained in:
Dany Marcoux
2019-10-01 21:24:40 +00:00
committed by Git OBS Bridge
parent 8112623fe7
commit 3bc7556b55
2 changed files with 8 additions and 4 deletions

View File

@@ -40,8 +40,8 @@ programming and markup languages. It has git integration and automatic paging.
%prep
%setup -qa1
mkdir cargo-home
cat >cargo-home/config <<EOF
mkdir .cargo
cat >.cargo/config <<EOF
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'
@@ -50,11 +50,9 @@ directory = './vendor'
EOF
%build
export CARGO_HOME=$PWD/cargo-home
cargo build --release --locked %{?_smp_mflags}
%install
export CARGO_HOME=$PWD/cargo-home
cargo install --root=%{buildroot}%{_prefix} --path .
# remove residue crate file