You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-rd-hashd/rust-rd-hashd.spec

75 lines
1.6 KiB

# Generated by rust2rpm 18
%bcond_without check
%global __cargo_skip_build 0
%global crate rd-hashd
3 years ago
%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}
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
URL: https://crates.io/crates/rd-hashd
Source: %{crates_source}
3 years ago
# 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}
3 years ago
%if 0%{?el8}
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging
3 years ago
%endif
%global _description %{expand:
Latency-sensitive pseudo workload for resctl-demo.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc README.md
%{_bindir}/rd-hashd
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p2
3 years ago
%if 0%{?el8}
%cargo_prep -V 1
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
3 years ago
%endif
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog