[packages/sccache] Add crates, .cargo/config updated from vendor command

glen glen at pld-linux.org
Wed Mar 17 15:29:25 CET 2021


commit 2eaa26ac8eee702ff4a48a6e47dbce38e3543b6b
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Mar 17 16:16:58 2021 +0200

    Add crates, .cargo/config updated from vendor command

 sccache.spec | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/sccache.spec b/sccache.spec
index 038d37b..e8048ef 100644
--- a/sccache.spec
+++ b/sccache.spec
@@ -6,10 +6,20 @@ License:	Apache v2.0
 Group:		Development/Tools
 Source0:	https://github.com/mozilla/sccache/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	acc81e9b1c7097d4119ad31cd6a845a9
-#Source1:	vendor.tar.gz
+# cd sccache-%{version}
+# cargo vendor
+# cd ..
+# tar -cJf sccache-crates-%{version}.tar.xz sccache-%{version}/{vendor,Cargo.lock}
+# ./dropin sccache-crates-%{version}.tar.xz
+Source1:	%{name}-crates-%{version}.tar.xz
+# Source1-md5:	a864c5cf727f15b9e17ab8d328f3c4be
 URL:		https://github.com/mozilla/sccache
 BuildRequires:	openssl-devel
-BuildRequires:	rust-packaging
+BuildRequires:	rust >= 1.43.0
+BuildRequires:	cargo
+BuildRequires:	rust
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
 ExcludeArch:	s390 s390x ppc ppc64 ppc64le
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -20,21 +30,21 @@ using the Amazon Simple Cloud Storage Service (S3) API, Redis or the
 Google Cloud Storage (GCS) API.
 
 %prep
-%setup -q
+%setup -q -b1
 
 install -d .cargo
-cat >.cargo/config <<EOF
+cat >.cargo/config <<'EOF'
 
 [source.crates-io]
-registry = 'https://github.com/rust-lang/crates.io-index'
-replace-with = 'vendored-sources'
-[source.vendored-sources]
-directory = './vendor'
-[install]
-root = '$RPM_BUILD_ROOT%{_prefix}'
-[term]
-verbose = true
+replace-with = "vendored-sources"
+
+[source."https://github.com/saresend/selenium-rs.git"]
+git = "https://github.com/saresend/selenium-rs.git"
+rev = "0314a2420da78cce7454a980d862995750771722"
+replace-with = "vendored-sources"
 
+[source.vendored-sources]
+directory = "vendor"
 EOF
 
 %build
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sccache.git/commitdiff/08a8c8dcb5f5a3e7e6931963826c9001dbfbc156



More information about the pld-cvs-commit mailing list