Blob Blame History Raw
# Generated by rust2rpm 25
# * Requires swTPM server running
%bcond_with check
%global debug_package %{nil}

%global crate tss-esapi

Name:           rust-tss-esapi
Version:        7.4.0
Release:        %autorelease
Summary:        Rust-native wrapper around TSS 2.0 Enhanced System API

License:        Apache-2.0
URL:            https://crates.io/crates/tss-esapi
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Rust-native wrapper around TSS 2.0 Enhanced System API.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       pkgconfig(tss2-esys) >= 4.0.0
Requires:       pkgconfig(tss2-tctildr) >= 4.0.0
Requires:       pkgconfig(tss2-mu) >= 4.0.0

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

%description -n %{name}+generate-bindings-devel %{_description}

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

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

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

%generate_buildrequires
%cargo_generate_buildrequires -f generate-bindings
echo 'pkgconfig(tss2-esys) >= 4.0.0'
echo 'pkgconfig(tss2-tctildr) >= 4.0.0'
echo 'pkgconfig(tss2-mu) >= 4.0.0'

%build
%cargo_build -f generate-bindings

%install
%cargo_install -f generate-bindings

%if %{with check}
%check
%cargo_test -f generate-bindings
%endif

%changelog
%autochangelog