]>
Commit | Line | Data |
---|---|---|
c609d31d ER |
1 | Summary: sccache is ccache with cloud storage |
2 | Name: sccache | |
dc6e6d77 | 3 | Version: 0.2.15 |
b7e1950a | 4 | Release: 1 |
c609d31d ER |
5 | License: Apache v2.0 |
6 | Group: Development/Tools | |
b7e1950a | 7 | Source0: https://github.com/mozilla/sccache/archive/v%{version}/%{name}-%{version}.tar.gz |
dc6e6d77 | 8 | # Source0-md5: dcb0cf6686c334df82f0a2b41eae19ab |
2eaa26ac ER |
9 | # cd sccache-%{version} |
10 | # cargo vendor | |
11 | # cd .. | |
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 | |
dc6e6d77 JR |
15 | # Source1-md5: cac0034c691ba28b575bb955fce1159d |
16 | Patch0: openssl.patch | |
c609d31d ER |
17 | URL: https://github.com/mozilla/sccache |
18 | BuildRequires: openssl-devel | |
2eaa26ac ER |
19 | BuildRequires: rust >= 1.43.0 |
20 | BuildRequires: cargo | |
21 | BuildRequires: rust | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | BuildRequires: xz | |
c609d31d ER |
24 | ExcludeArch: s390 s390x ppc ppc64 ppc64le |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
dc6e6d77 JR |
27 | # TODO: this should not be needed |
28 | %define _debugsource_packages 0 | |
29 | ||
c609d31d ER |
30 | %description |
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. | |
35 | ||
36 | %prep | |
2eaa26ac | 37 | %setup -q -b1 |
dc6e6d77 | 38 | %patch0 -p1 |
c609d31d ER |
39 | |
40 | install -d .cargo | |
2eaa26ac | 41 | cat >.cargo/config <<'EOF' |
c609d31d ER |
42 | |
43 | [source.crates-io] | |
2eaa26ac ER |
44 | replace-with = "vendored-sources" |
45 | ||
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" | |
c609d31d | 50 | |
2eaa26ac ER |
51 | [source.vendored-sources] |
52 | directory = "vendor" | |
c609d31d ER |
53 | EOF |
54 | ||
55 | %build | |
0306bb3d | 56 | export CARGO_HOME="$(pwd)/.cargo" |
52b22b7f | 57 | export PKG_CONFIG_ALLOW_CROSS=1 |
0306bb3d ER |
58 | |
59 | cargo -v build \ | |
60 | %ifarch x32 | |
61 | --target x86_64-unknown-linux-gnux32 \ | |
62 | %endif | |
63 | --release \ | |
dc6e6d77 | 64 | --offline |
c609d31d ER |
65 | |
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
08a8c8dc ER |
71 | export CARGO_HOME="$(pwd)/.cargo" |
72 | ||
73 | cargo -vv \ | |
74 | install \ | |
75 | --frozen \ | |
76 | --path . \ | |
77 | --root $RPM_BUILD_ROOT%{_prefix} | |
c609d31d | 78 | |
08a8c8dc ER |
79 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates.toml |
80 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates2.json | |
c609d31d ER |
81 | |
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.md LICENSE | |
85 | %attr(755,root,root) %{_bindir}/sccache |