fix: rust-sccache (#306)

This commit is contained in:
madomado
2023-03-28 11:16:19 +08:00
committed by GitHub
parent 6d69aa0250
commit 23a1641a91
2 changed files with 70 additions and 141 deletions
+66 -137
View File
@@ -1,13 +1,12 @@
# Generated by rust2rpm 22
%bcond_without check
# Generated by rust2rpm 24
# dont run brp scriptlet
%undefine __brp_mangle_shebangs
%global debug_package %{nil}
%global crate sccache
Name: rust-sccache
Version: 0.4.1
Release: 1%{?dist}
Release: %autorelease
Summary: Ccache-like tool
License: Apache-2.0
@@ -16,15 +15,12 @@ Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
Patch: sccache-fix-metadata-auto.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging >= 21
BuildRequires: anda-srpm-macros
BuildRequires: openssl-devel
BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 openssl-devel pkg-config
%global _description %{expand:
Ccache-like tool. It is used as a compiler wrapper and avoids compilation when
possible, storing a cache in a remote storage using the S3 API.}
Sccache is a ccache-like tool. It is used as a compiler wrapper and
avoids compilation when possible, storing a cache in a remote storage
using various cloud storage.}
%description %{_description}
@@ -37,21 +33,8 @@ Summary: %{summary}
%license LICENSE
%doc CODE_OF_CONDUCT.md
%doc README.md
#%%{_bindir}/sccache-dist
%{_bindir}/sccache
# if x86_64
%ifarch x86_64
%package -n %{crate}-dist
Summary: sccache distributed server
%description -n %{crate}-dist
Distributed server for sccache.
%files -n %{crate}-dist
%{_bindir}/sccache-dist
%endif
%package devel
Summary: %{summary}
@@ -63,9 +46,6 @@ This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/CODE_OF_CONDUCT.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
@@ -104,18 +84,6 @@ use the "azure" feature of the "%{crate}" crate.
%files -n %{name}+azure-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+chrono-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+chrono-devel %{_description}
This package contains library source intended for building other packages which
use the "chrono" feature of the "%{crate}" crate.
%files -n %{name}+chrono-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+crossbeam-utils-devel
Summary: %{summary}
BuildArch: noarch
@@ -188,16 +156,16 @@ use the "gcs" feature of the "%{crate}" crate.
%files -n %{name}+gcs-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+hmac-devel
%package -n %{name}+gha-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+hmac-devel %{_description}
%description -n %{name}+gha-devel %{_description}
This package contains library source intended for building other packages which
use the "hmac" feature of the "%{crate}" crate.
use the "gha" feature of the "%{crate}" crate.
%files -n %{name}+hmac-devel
%files -n %{name}+gha-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+hyper-devel
@@ -212,18 +180,6 @@ use the "hyper" feature of the "%{crate}" crate.
%files -n %{name}+hyper-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+hyperx-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+hyperx-devel %{_description}
This package contains library source intended for building other packages which
use the "hyperx" feature of the "%{crate}" crate.
%files -n %{name}+hyperx-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+jsonwebtoken-devel
Summary: %{summary}
BuildArch: noarch
@@ -248,18 +204,6 @@ use the "libmount" feature of the "%{crate}" crate.
%files -n %{name}+libmount-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+md-5-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+md-5-devel %{_description}
This package contains library source intended for building other packages which
use the "md-5" feature of the "%{crate}" crate.
%files -n %{name}+md-5-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+memcached-devel
Summary: %{summary}
BuildArch: noarch
@@ -272,18 +216,6 @@ use the "memcached" feature of the "%{crate}" crate.
%files -n %{name}+memcached-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+memcached-rs-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+memcached-rs-devel %{_description}
This package contains library source intended for building other packages which
use the "memcached-rs" feature of the "%{crate}" crate.
%files -n %{name}+memcached-rs-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+native-zlib-devel
Summary: %{summary}
BuildArch: noarch
@@ -308,6 +240,18 @@ use the "nix" feature of the "%{crate}" crate.
%files -n %{name}+nix-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+opendal-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+opendal-devel %{_description}
This package contains library source intended for building other packages which
use the "opendal" feature of the "%{crate}" crate.
%files -n %{name}+opendal-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+openssl-devel
Summary: %{summary}
BuildArch: noarch
@@ -320,18 +264,6 @@ use the "openssl" feature of the "%{crate}" crate.
%files -n %{name}+openssl-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+percent-encoding-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+percent-encoding-devel %{_description}
This package contains library source intended for building other packages which
use the "percent-encoding" feature of the "%{crate}" crate.
%files -n %{name}+percent-encoding-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+redis-devel
Summary: %{summary}
BuildArch: noarch
@@ -344,6 +276,18 @@ use the "redis" feature of the "%{crate}" crate.
%files -n %{name}+redis-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+reqsign-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+reqsign-devel %{_description}
This package contains library source intended for building other packages which
use the "reqsign" feature of the "%{crate}" crate.
%files -n %{name}+reqsign-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+reqwest-devel
Summary: %{summary}
BuildArch: noarch
@@ -356,18 +300,6 @@ use the "reqwest" feature of the "%{crate}" crate.
%files -n %{name}+reqwest-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+ring-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+ring-devel %{_description}
This package contains library source intended for building other packages which
use the "ring" feature of the "%{crate}" crate.
%files -n %{name}+ring-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+rouille-devel
Summary: %{summary}
BuildArch: noarch
@@ -392,18 +324,6 @@ use the "s3" feature of the "%{crate}" crate.
%files -n %{name}+s3-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+sha-1-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+sha-1-devel %{_description}
This package contains library source intended for building other packages which
use the "sha-1" feature of the "%{crate}" crate.
%files -n %{name}+sha-1-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+sha2-devel
Summary: %{summary}
BuildArch: noarch
@@ -416,18 +336,6 @@ use the "sha2" feature of the "%{crate}" crate.
%files -n %{name}+sha2-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+simple-s3-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+simple-s3-devel %{_description}
This package contains library source intended for building other packages which
use the "simple-s3" feature of the "%{crate}" crate.
%files -n %{name}+simple-s3-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+syslog-devel
Summary: %{summary}
BuildArch: noarch
@@ -464,6 +372,18 @@ use the "url" feature of the "%{crate}" crate.
%files -n %{name}+url-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+vendored-openssl-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+vendored-openssl-devel %{_description}
This package contains library source intended for building other packages which
use the "vendored-openssl" feature of the "%{crate}" crate.
%files -n %{name}+vendored-openssl-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+version-compare-devel
Summary: %{summary}
BuildArch: noarch
@@ -488,24 +408,33 @@ use the "void" feature of the "%{crate}" crate.
%files -n %{name}+void-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+webdav-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+webdav-devel %{_description}
This package contains library source intended for building other packages which
use the "webdav" feature of the "%{crate}" crate.
%files -n %{name}+webdav-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep_online
%build
%ifarch x86_64
%cargo_build -a
%else
%cargo_build
%endif
%cargo_build -f dist-server
%install
%ifarch x86_64
%cargo_install -a
%else
%cargo_install
%endif
%cargo_install -f dist-server
%if %{with check}
%check
%cargo_test -f dist-server
%endif
%changelog
%autochangelog
@@ -1,8 +1,8 @@
--- sccache-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ sccache-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00
@@ -402,14 +402,3 @@
--- sccache-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ sccache-0.4.1/Cargo.toml 2023-03-27T14:56:08.411559+00:00
@@ -358,14 +358,3 @@
[target."cfg(unix)".dependencies.daemonize]
version = "0.4"
version = "0.5"
-[target."cfg(windows)".dependencies.parity-tokio-ipc]
-version = "0.9"