# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} # prevent executables from being installed %global cargo_install_bin 0 %global crate raw-cpuid # compile and run tests only on supported architectures %global supported_arches x86_64 i686 Name: rust-raw-cpuid Version: 11.1.0 Release: %autorelease Summary: Library to parse the x86 CPUID instruction License: MIT URL: https://crates.io/crates/raw-cpuid Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * - Remove clashing binary package # * - Remove cli and display features Patch: raw-cpuid-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 26 %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} %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}+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 %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f serialize,std %build %ifarch %{supported_arches} %cargo_build -f serialize,std %endif %install %cargo_install -f serialize,std %if %{with check} %ifarch %{supported_arches} %check %cargo_test -f serialize,std %endif %endif %changelog %autochangelog