# Generated by rust2rpm 27 # * Doesn't compile for testutils %bcond check 0 # prevent library files from being installed %global cargo_install_lib 0 %global crate dprint Name: rust-dprint Version: 0.49.0 Release: 2%{?dist} Summary: Pluggable and configurable code formatting platform written in Rust. License: MIT URL: https://crates.io/crates/dprint Source: %{crates_source} Source: dprint-0.49.0-vendor.tar.xz # Automatically generated patch to strip dependencies and normalize metadata Patch: dprint-fix-metadata-auto.diff BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: Binary for dprint code formatter—a pluggable and configurable code formatting platform.} %description %{_description} %package -n %{crate} Summary: %{summary} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/dprint %{_datadir}/fish/vendor_completions.d/dprint.fish %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor find ./vendor -type f -executable -name '*.rs' -exec chmod -x '{}' \; %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install %cargo_install mkdir -p "$RPM_BUILD_ROOT%{_datadir}/fish/vendor_completions.d" "$RPM_BUILD_ROOT%{_bindir}/dprint" completions fish > "$RPM_BUILD_ROOT%{_datadir}/fish/vendor_completions.d/dprint.fish" %if %{with check} %check %cargo_test %endif %changelog %autochangelog