# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate tonic-types Name: rust-tonic-types Version: 0.12.2 Release: %autorelease Summary: Collection of useful protobuf types that can be used with tonic License: MIT AND Apache-2.0 URL: https://crates.io/crates/tonic-types Source: %{crates_source} # * https://github.com/hyperium/tonic/pull/1942 Source2: LICENSE-APACHE # Manually created patch for downstream crate metadata changes # * Add dependencies to run build.rs # * Add Apache-2.0 license metadata Patch: tonic-types-fix-metadata.diff # * Move codegen to inside the crate Patch10: rust-tonic-types-0.12.2-0001-Add-build_rs.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: protobuf-devel %global _description %{expand: A collection of useful protobuf types that can be used with `tonic`.} %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-MIT %license %{crate_instdir}/LICENSE-APACHE %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 %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep # Remove pre-generated files # src/generated/types.bin file has embedded license of MIT, Apache-2.0 and BSD-3-Clause rm -rf src/generated # Rename MIT license file mv LICENSE LICENSE-MIT cp -pav %{SOURCE2} . %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog