# Generated by rust2rpm 21 %bcond_without check %global debug_package %{nil} %global crate cradle Name: rust-%{crate} Version: 0.2.2 Release: %autorelease Summary: Execute child processes with ease # Upstream license specification: CC0-1.0 License: CC0 URL: https://crates.io/crates/cradle Source: %{crates_source} # Initial patched metadata # - Relax bitflags # - Bump gag to 1 # - Bump nix to 0.24.0 Patch0: cradle-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 %global _description %{expand: Execute child processes with ease.} %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 %doc %{crate_instdir}/README.md %doc %{crate_instdir}/README.php %{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}+executable-path-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+executable-path-devel %{_description} This package contains library source intended for building other packages which use the "executable-path" feature of the "%{crate}" crate. %files -n %{name}+executable-path-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gag-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gag-devel %{_description} This package contains library source intended for building other packages which use the "gag" feature of the "%{crate}" crate. %files -n %{name}+gag-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+nix-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+nix-devel %{_description} This package contains library source intended for building other packages which use the "nix" feature of the "%{crate}" crate. %files -n %{name}+nix-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+test_executables-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+test_executables-devel %{_description} This package contains library source intended for building other packages which use the "test_executables" feature of the "%{crate}" crate. %files -n %{name}+test_executables-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires echo 'vim-common' echo 'crate(gag)' echo 'crate(nix)' echo 'crate(memoffset)' %build %cargo_build -- --features=test_executables %install %cargo_install %if %{with check} %check # https://github.com/Stebalien/gag-rs/blob/master/README.md # Won't work in rust test cases. The rust test cases use std::io::set_print # to redirect stdout. You can get around this though by using the --nocapture # argument when running your tests. # 1 test failure: # error: package ID specification `memory-tests` did not match any packages # thread 'memory_test' panicked at 'cradle error: cargo build -p memory-tests --release: # exited with exit code: 101', tests/integration.rs:350:5 # test memory_test ... FAILED # It seems not included in the crate. %cargo_test -- -- --nocapture ||: %endif %changelog %autochangelog