File rust-iroh-net.spec of Package rust-iroh-net

# Generated by rust2rpm 26
%bcond_with check

%global crate iroh-net

Name:           rust-%{crate}
Version:        0.18.0
Release:        1%{?dist}
Summary:        Networking support for iroh

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/iroh-net
Source:         https://crates.io/api/v1/crates/%crate/%version/download#/%crate-%version.crate
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          iroh-net-fix-metadata-auto.diff

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Networking support for iroh.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# FIXME: paste output of %%cargo_license_summary here
License:        # FIXME
# LICENSE.dependencies contains a full license breakdown

%description -n %{crate} %{_description}

%files       -n %{crate}
%license LICENSE-BSD3
%license LICENSE.dependencies
%doc README.md
%{_bindir}/iroh-relay

%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-BSD3
%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}+axum-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+axum-devel %{_description}

This package contains library source intended for building other packages which
use the "axum" feature of the "%{crate}" crate.

%files       -n %{name}+axum-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+clap-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+clap-devel %{_description}

This package contains library source intended for building other packages which
use the "clap" feature of the "%{crate}" crate.

%files       -n %{name}+clap-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+iroh-relay-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+iroh-relay-devel %{_description}

This package contains library source intended for building other packages which
use the "iroh-relay" feature of the "%{crate}" crate.

%files       -n %{name}+iroh-relay-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+metrics-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+metrics-devel %{_description}

This package contains library source intended for building other packages which
use the "metrics" feature of the "%{crate}" crate.

%files       -n %{name}+metrics-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+regex-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+regex-devel %{_description}

This package contains library source intended for building other packages which
use the "regex" feature of the "%{crate}" crate.

%files       -n %{name}+regex-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+rustls-pemfile-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+rustls-pemfile-devel %{_description}

This package contains library source intended for building other packages which
use the "rustls-pemfile" feature of the "%{crate}" crate.

%files       -n %{name}+rustls-pemfile-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+serde_with-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+serde_with-devel %{_description}

This package contains library source intended for building other packages which
use the "serde_with" feature of the "%{crate}" crate.

%files       -n %{name}+serde_with-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+test-utils-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+test-utils-devel %{_description}

This package contains library source intended for building other packages which
use the "test-utils" feature of the "%{crate}" crate.

%files       -n %{name}+test-utils-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+toml-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+toml-devel %{_description}

This package contains library source intended for building other packages which
use the "toml" feature of the "%{crate}" crate.

%files       -n %{name}+toml-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+tracing-subscriber-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+tracing-subscriber-devel %{_description}

This package contains library source intended for building other packages which
use the "tracing-subscriber" feature of the "%{crate}" crate.

%files       -n %{name}+tracing-subscriber-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires -f iroh-relay

%build
%cargo_build -f iroh-relay
%{cargo_license_summary -f iroh-relay}
%{cargo_license -f iroh-relay} > LICENSE.dependencies

%install
%cargo_install -f iroh-relay

%if %{with check}
%check
%cargo_test -f iroh-relay
%endif