# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} # prevent executables from being installed %global cargo_install_bin 0 %global crate protox Name: rust-protox Version: 0.9.1 Release: %autorelease Summary: Rust implementation of the protobuf compiler License: MIT OR Apache-2.0 URL: https://crates.io/crates/protox Source: %{crates_source} BuildRequires: cargo-rpm-macros >= 26 BuildRequires: protobuf-devel %global _description %{expand: A rust implementation of the protobuf compiler.} %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-APACHE %license %{crate_instdir}/LICENSE-MIT %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 %generate_buildrequires %cargo_generate_buildrequires -f bin %build %cargo_build -f bin %install %cargo_install -f bin %if %{with check} %check # * google_*: Tries to access files in src/protobuf/* which are stripped %{cargo_test -f bin -- -- --exact %{shrink: --skip google_map_proto2_unittest --skip google_map_unittest --skip google_protobuf_any --skip google_protobuf_api --skip google_protobuf_compiler_plugin --skip google_protobuf_descriptor --skip google_protobuf_duration --skip google_protobuf_empty --skip google_protobuf_field_mask --skip google_protobuf_source_context --skip google_protobuf_struct --skip google_protobuf_timestamp --skip google_protobuf_type --skip google_protobuf_wrappers --skip google_test_messages_proto2 --skip google_test_messages_proto3 --skip google_unittest --skip google_unittest_empty --skip google_unittest_enormous_descriptor --skip google_unittest_import --skip google_unittest_no_field_presence --skip google_unittest_preserve_unknown_enum --skip google_unittest_preserve_unknown_enum2 --skip google_unittest_proto3 --skip google_unittest_proto3_optional --skip google_unittest_well_known_types }} %endif %changelog %autochangelog