# Generated by rust2rpm 28 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate onefetch %global _trivial .0 %global _buildid .1 %global __brp_mangle_shebangs /usr/bin/true Name: rust-onefetch Version: 2.27.1 Release: 1%{?dist}%{?_trivial}%{?_buildid} Summary: Command-line Git information tool License: MIT URL: https://crates.io/crates/onefetch Source: %{name}-%{version}-processed.tar.gz # Manually created patch for downstream crate metadata changes # * Do not depend on criterion; it is needed only for benchmarks # * Bump gix to version 0.83 # * Bump gix-features to version 0.48 # * Allow older strum 0.27 for EPEL10.2 and older # * Patch out tests/repo.rs, which requires gix-testtools, and remove the # dev-dependency on gix-testtools. In theory, we could package gix-testtools, # but the maintainer of the gix stack in Fedora does not intend to do so, # reasonably citing upstream discouragement in # https://github.com/Byron/gitoxide/discussions/900. BuildRequires: rust-toolset BuildRequires: openssl-devel BuildRequires: help2man %global _description %{expand: Command-line Git information tool.} %description %{_description} %package -n %{crate} Summary: %{summary} # (Apache-2.0 OR MIT) AND BSD-3-Clause # (MIT OR Apache-2.0) AND Unicode-3.0 # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-3-Clause OR Apache-2.0 # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT # Zlib # Zlib OR Apache-2.0 OR MIT License: %{shrink: (0BSD OR Apache-2.0 OR MIT) AND Apache-2.0 AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSD-3-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND BSD-3-Clause AND MIT AND (MIT OR Unlicense) AND MPL-2.0 AND Unicode-3.0 AND Unicode-DFS-2016 AND Zlib } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.md %license LICENSE.dependencies %license cargo-vendor.txt %doc CHANGELOG.md %doc CONTRIBUTING.md %doc README.md %{_bindir}/onefetch %{_mandir}/man1/onefetch.1* %{bash_completions_dir}/onefetch.bash %{fish_completions_dir}/onefetch.fish %{zsh_completions_dir}/_onefetch %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep -v vendor %build export OPENSSL_NO_VENDOR=1 %cargo_build %{cargo_license_summary} %{cargo_vendor_manifest} %{cargo_license} > LICENSE.dependencies # Generate a man page (of adequate quality). This should match the one in # docs/onefetch.1, except that it is guaranteed to be up to date. See also: # https://github.com/o2sh/onefetch/pull/1376 help2man --no-info --output=onefetch.1 --name='%{summary}' target/rpm/onefetch %install %cargo_install # install the generated man page install -t %{buildroot}%{_mandir}/man1 -D -p -m 0644 onefetch.1 # generate and install shell completions target/rpm/onefetch --generate bash > onefetch.bash target/rpm/onefetch --generate fish > onefetch.fish target/rpm/onefetch --generate zsh > _onefetch install -Dpm 0644 onefetch.bash -t %{buildroot}/%{bash_completions_dir} install -Dpm 0644 onefetch.fish -t %{buildroot}/%{fish_completions_dir} install -Dpm 0644 _onefetch -t %{buildroot}/%{zsh_completions_dir} %if %{with check} %check exit 0 %cargo_test %endif %changelog * Fri Jul 03 2026 AL2023 rebuild - %{version}-1 - AL2023 rust-toolset vendored binary build