# Generated by rust2rpm 27 %bcond check 1 %global crate unsafe-libyaml-norway Name: rust-unsafe-libyaml-norway Version: 0.2.15 Release: %autorelease Summary: Libyaml transpiled to rust by c2rust License: MIT URL: https://crates.io/crates/unsafe-libyaml-norway Source: %{crates_source} # https://github.com/cafkafk/unsafe-libyaml-norway/pull/4 Patch: 0001-Starting-with-Rust-1.89-2025-08-07-the-lint-dangerou.patch Patch: 0002-Fixed-wrong-library-name-in-README.md.patch Patch: extern-crate.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Libyaml transpiled to rust by c2rust.} %description %{_description} %package -n %{crate} Summary: %{summary} License: MIT %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-MIT %doc README.md %{_bindir}/run-emitter-test-suite %{_bindir}/run-parser-test-suite %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 %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 -p1 -n %{crate}-%{version} %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install %if %{with check} %check # unit tests don't build for some reason %cargo_test -- --lib --bins %endif %changelog %autochangelog