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-xxhash-c-sys/rust-xxhash-c-sys.spec

83 lines
1.9 KiB

# Generated by rust2rpm 21
%bcond_without check
%global debug_package %{nil}
%global crate xxhash-c-sys
Name: rust-%{crate}
Version: 0.8.3
Release: %autorelease
Summary: Bindings to xxhash
# Upstream license specification: BSL-1.0
# https://github.com/DoumanAsh/xxhash-c-sys/pull/3
License: Boost
URL: https://crates.io/crates/xxhash-c-sys
Source0: %{crates_source}
Source1: https://github.com/DoumanAsh/xxhash-c-sys/raw/d241dc8/LICENSE
# Initial patched metadata
# * build and link against shared xxhash library
Patch0: xxhash-c-sys-fix-metadata.diff
Patch1: 0001-build-and-link-against-shared-xxhash-library.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Bindings to xxhash.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig(libxxhash) >= 0.8.1
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# remove bundled copy of xxhash
rm -r src/c
%cargo_prep
cp %{SOURCE1} .
%generate_buildrequires
%cargo_generate_buildrequires
echo 'pkgconfig(libxxhash) >= 0.8.1'
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog