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

92 lines
2.4 KiB

# Generated by rust2rpm 24
# * tests can only be run in-tree
%bcond_with check
%global debug_package %{nil}
%global crate serde_derive
Name: rust-serde_derive
Version: 1.0.177
Release: %autorelease
Summary: Implementation of #[derive(Serialize, Deserialize)]
License: MIT OR Apache-2.0
URL: https://crates.io/crates/serde_derive
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * ensure dependencies are available on all architectures
Patch: serde_derive-fix-metadata.diff
# * do not rely on precompiled binaries on x86_64:
# https://github.com/serde-rs/serde/issues/2538
Patch: 0001-Drop-usage-of-precompiled-binary-that-s-not-usable-f.patch
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Implementation of #[derive(Serialize, Deserialize)].}
%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-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/crates-io.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}+deserialize_in_place-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+deserialize_in_place-devel %{_description}
This package contains library source intended for building other packages which
use the "deserialize_in_place" feature of the "%{crate}" crate.
%files -n %{name}+deserialize_in_place-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
# remove pre-built upstream binaries for x86_64 that MUST NOT be redistributed
rm -v serde_derive-x86_64-unknown-linux-gnu
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog