1 Summary: sccache is ccache with cloud storage
6 Group: Development/Tools
7 Source0: https://github.com/mozilla/sccache/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: dcb0cf6686c334df82f0a2b41eae19ab
9 # cd sccache-%{version}
12 # tar -cJf sccache-crates-%{version}.tar.xz sccache-%{version}/{vendor,Cargo.lock}
13 # ./dropin sccache-crates-%{version}.tar.xz
14 Source1: %{name}-crates-%{version}.tar.xz
15 # Source1-md5: cac0034c691ba28b575bb955fce1159d
17 URL: https://github.com/mozilla/sccache
18 BuildRequires: openssl-devel
19 BuildRequires: rust >= 1.43.0
22 BuildRequires: tar >= 1:1.22
24 ExcludeArch: s390 s390x ppc ppc64 ppc64le
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 # TODO: this should not be needed
28 %define _debugsource_packages 0
31 Sccache is a ccache-like tool. It is used as a compiler wrapper and
32 avoids compilation when possible, storing a cache in a remote storage
33 using the Amazon Simple Cloud Storage Service (S3) API, Redis or the
34 Google Cloud Storage (GCS) API.
41 cat >.cargo/config <<'EOF'
44 replace-with = "vendored-sources"
46 [source."https://github.com/saresend/selenium-rs.git"]
47 git = "https://github.com/saresend/selenium-rs.git"
48 rev = "0314a2420da78cce7454a980d862995750771722"
49 replace-with = "vendored-sources"
51 [source.vendored-sources]
56 export CARGO_HOME="$(pwd)/.cargo"
57 export PKG_CONFIG_ALLOW_CROSS=1
61 --target x86_64-unknown-linux-gnux32 \
67 rm -rf $RPM_BUILD_ROOT
70 rm -rf $RPM_BUILD_ROOT
71 export CARGO_HOME="$(pwd)/.cargo"
77 --root $RPM_BUILD_ROOT%{_prefix}
79 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates.toml
80 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates2.json
83 %defattr(644,root,root,755)
84 %doc README.md LICENSE
85 %attr(755,root,root) %{_bindir}/sccache