# Generated by rust2rpm 28 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate git-absorb Name: rust-git-absorb Version: 0.9.0 Release: %autorelease Summary: Git commit --fixup, but automatic License: BSD-3-Clause URL: https://crates.io/crates/git-absorb Source: %{crates_source} Source: git-absorb-0.9.0-vendor.tar.xz Source2: https://raw.githubusercontent.com/tummychow/git-absorb/refs/tags/%{version}/Documentation/git-absorb.adoc Source3: https://raw.githubusercontent.com/tummychow/git-absorb/refs/tags/%{version}/Documentation/Makefile BuildRequires: cargo-rpm-macros >= 26 BuildRequires: asciidoc %if %{with check} BuildRequires: git-core %endif %global _description %{expand: Git commit --fixup, but automatic.} %description %{_description} %package -n %{crate} Summary: %{summary} # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-3-Clause # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MPL-2.0 OR MIT OR Apache-2.0 # Unlicense OR MIT # Zlib OR Apache-2.0 OR MIT License: (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MPL-2.0 OR MIT OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.md %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_bindir}/git-absorb %{_mandir}/man1/git-absorb.1* %{bash_completions_dir}/git-absorb %{fish_completions_dir}/git-absorb.fish %{zsh_completions_dir}/_git-absorb %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} # Generate shell completions ./target/rpm/git-absorb --gen-completions bash > git-absorb.bash ./target/rpm/git-absorb --gen-completions fish > git-absorb.fish ./target/rpm/git-absorb --gen-completions zsh > git-absorb.zsh # Generate man page cp %{SOURCE2} %{SOURCE3} . make git-absorb.1 %install %cargo_install # Install manpage install -Dpm 644 git-absorb.1 -t %{buildroot}/%{_mandir}/man1/ # Install shell completions install -Dpm 0644 git-absorb.bash %{buildroot}/%{bash_completions_dir}/git-absorb install -Dpm 0644 git-absorb.fish %{buildroot}/%{fish_completions_dir}/git-absorb.fish install -Dpm 0644 git-absorb.zsh %{buildroot}/%{zsh_completions_dir}/_git-absorb %if %{with check} %check %cargo_test %endif %changelog %autochangelog