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-yoke/rust-yoke.spec

124 lines
3.2 KiB

# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
%global crate yoke
Name: rust-yoke
Version: 0.7.5
Release: %autorelease
Summary: Abstraction allowing borrowed data to be carried along with its backing data
License: Unicode-3.0
URL: https://crates.io/crates/yoke
Source: %{crates_source}
# * Downstream-only: ignore an example that would depend on the postcard crate:
# it is not worth packaging this merely to compile an example.
Patch10: 0001-Downstream-only-ignore-an-example-that-would-depend-.patch
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: tomcli
%global _description %{expand:
Abstraction allowing borrowed data to be carried along with the backing
data it borrows from.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%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
%package -n %{name}+alloc-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+alloc-devel %{_description}
This package contains library source intended for building other packages which
use the "alloc" feature of the "%{crate}" crate.
%files -n %{name}+alloc-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+derive-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+derive-devel %{_description}
This package contains library source intended for building other packages which
use the "derive" feature of the "%{crate}" crate.
%files -n %{name}+derive-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+serde-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+serde-devel %{_description}
This package contains library source intended for building other packages which
use the "serde" feature of the "%{crate}" crate.
%files -n %{name}+serde-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+zerofrom-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+zerofrom-devel %{_description}
This package contains library source intended for building other packages which
use the "zerofrom" feature of the "%{crate}" crate.
%files -n %{name}+zerofrom-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# Do not depend on postcard; it is needed only for one (patched-out) example.
tomcli set Cargo.toml del dev-dependencies.postcard
%generate_buildrequires
%cargo_generate_buildrequires -f derive
%build
%cargo_build -f derive
%install
%cargo_install -f derive
%if %{with check}
%check
%cargo_test -f derive
%endif
%changelog
%autochangelog