Regenerate with rust2rpm v24

epel9
Fabio Valentini 2 years ago
parent 6b3fcb7169
commit 9fb33d997f
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -1,3 +0,0 @@
# rust-rd-hashd
The rust-rd-hashd package

@ -1,37 +1,20 @@
# Generated by rust2rpm 18
# Generated by rust2rpm 24
%bcond_without check
%global __cargo_skip_build 0
%global crate rd-hashd
%if 0%{?el8}
# el8 doesn't have these macros
%global __crates_url https://crates.io/api/v1/crates/
%global crates_source %{__crates_url}%{crate}/%{version}/download#/%{crate}-%{version}.crate
%global version_no_tilde %{version}
%endif
Name: rust-%{crate}
Name: rust-rd-hashd
Version: 2.1.2
Release: %autorelease
Summary: Latency-sensitive pseudo workload for resctl-demo
# Upstream license specification: Apache-2.0
License: ASL 2.0 and BSD and MIT
License: Apache-2.0
URL: https://crates.io/crates/rd-hashd
Source: %{crates_source}
# Vendored dependencies for EPEL, update with ./update-vendor-tarball.sh
Source1: %{crate}-%{version}-vendor.tar.gz
# hashd: build fix for 32bit archs
Patch0: https://github.com/facebookexperimental/resctl-demo/commit/dbe5735bdf005a24e54dd19559016a59f6f43536.patch
ExclusiveArch: %{rust_arches}
%if 0%{?el8}
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging
%endif
BuildRequires: rust-packaging >= 23
%global _description %{expand:
Latency-sensitive pseudo workload for resctl-demo.}
@ -40,27 +23,35 @@ Latency-sensitive pseudo workload for resctl-demo.}
%package -n %{crate}
Summary: %{summary}
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# Apache-2.0 OR BSL-1.0
# BSD-3-Clause
# MIT
# MIT OR Apache-2.0
# Unlicense OR MIT
License: Apache-2.0 AND BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%license LICENSE.dependencies
%doc README.md
%{_bindir}/rd-hashd
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p2
%if 0%{?el8}
%cargo_prep -V 1
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%endif
%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install

@ -1,25 +0,0 @@
#!/bin/sh
name='rd-hashd'
specfile="rust-${name}.spec"
version=$(rpm -q --qf '%{VERSION}\n' --specfile "$specfile" | head -1)
nv="${name}-${version}"
crate="${nv}.crate"
vendor_tarball="${nv}-vendor.tar.gz"
if [ -f "$vendor_tarball" ]; then
echo "${vendor_tarball} already exists, aborting"
exit 1
fi
[ -f "$crate" ] || spectool -g "$specfile"
tardir="$PWD"
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
tar xvzf "$tardir/$crate" -C "$workdir"
(cd "${workdir}/${nv}" && \
cargo vendor && \
tar cvzf "${tardir}/${vendor_tarball}" vendor/)
exit 0
Loading…
Cancel
Save