# Generated by rust2rpm 26 %bcond_without check # TODO: enable cli feature once we have dependencies ready. # (crate(termimad/default) >= 0.25.0 with crate(termimad/default) < 0.26.0~) %bcond_with cli %global crate raw-cpuid Name: rust-raw-cpuid Version: 11.1.0 Release: %autorelease Summary: Rust library to parse the x86 CPUID instruction License: MIT URL: https://crates.io/crates/raw-cpuid Source: %{crates_source} BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: A library to parse the x86 CPUID instruction, written in rust with no external dependencies. The implementation closely resembles the Intel CPUID manual description. The library does only depend on libcore.} %description %{_description} %if %{with cli} %package -n %{crate} Summary: %{summary} # FIXME: paste output of %%cargo_license_summary here, # once we are able to build also cli License: MIT # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.md %license LICENSE.dependencies %doc AUTHORS %doc CHANGELOG.md %doc README.md %{_bindir}/cpuid %else # without cli %global debug_package %{nil} %endif %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.md %doc %{crate_instdir}/AUTHORS %doc %{crate_instdir}/CHANGELOG.md %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}+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}+cli-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+cli-devel %{_description} This package contains library source intended for building other packages which use the "cli" feature of the "%{crate}" crate. %files -n %{name}+cli-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+display-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+display-devel %{_description} This package contains library source intended for building other packages which use the "display" feature of the "%{crate}" crate. %files -n %{name}+display-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}+serde_derive-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+serde_derive-devel %{_description} This package contains library source intended for building other packages which use the "serde_derive" feature of the "%{crate}" crate. %files -n %{name}+serde_derive-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde_json-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+serde_json-devel %{_description} This package contains library source intended for building other packages which use the "serde_json" feature of the "%{crate}" crate. %files -n %{name}+serde_json-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serialize-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+serialize-devel %{_description} This package contains library source intended for building other packages which use the "serialize" feature of the "%{crate}" crate. %files -n %{name}+serialize-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+std-devel %{_description} This package contains library source intended for building other packages which use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+termimad-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+termimad-devel %{_description} This package contains library source intended for building other packages which use the "termimad" feature of the "%{crate}" crate. %files -n %{name}+termimad-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %if %{with cli} %cargo_generate_buildrequires -f cli %else %cargo_generate_buildrequires %endif %build %if %{with cli} %cargo_build -f cli %{cargo_license_summary -f cli} %{cargo_license -f cli} > LICENSE.dependencies %else %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %endif %install %if %{with cli} %cargo_install -f cli %else %cargo_install %endif %if %{with check} %check %if %{with cli} %cargo_test -f cli %else %cargo_test %endif %endif %changelog %autochangelog