## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 %global crate onefetch Name: rust-onefetch Version: 2.23.1 Release: %autorelease Summary: Command-line Git information tool License: MIT URL: https://crates.io/crates/onefetch Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: onefetch-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * Patch out tests/repo.rs, which requires gix-testtools # * Bump tokei from 13.0.0-alpha.7 to 13.0.0-alpha.8: # https://github.com/o2sh/onefetch/commit/55453c80177210c7a8c214b2dcfcaab10916e06c # * Allow gix 0.70, gix-features 0.40: # https://github.com/o2sh/onefetch/commit/3ff3ec298ecde3303a575c3b67bdb235c0ed2489 # * Loosen MSRV from 1.81.0 to 1.79.0 Patch: onefetch-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: help2man BuildRequires: tomcli %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-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-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # 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-2-Clause OR MIT) 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-DFS-2016 AND Zlib } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.md %license resources/license.cache.zstd %license LICENSE.dependencies %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 %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.md %license %{crate_instdir}/resources/license.cache.zstd %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CONTRIBUTING.md %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 %package -n %{name}+fail-on-deprecated-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+fail-on-deprecated-devel %{_description} This package contains library source intended for building other packages which use the "fail-on-deprecated" feature of the "%{crate}" crate. %files -n %{name}+fail-on-deprecated-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep # Do not depend on criterion; it is needed only for benchmarks. tomcli set Cargo.toml del dev-dependencies.criterion # We could package gix-testtools as a test dependency, enabling (as of this # writing) five more tests. The maintainer of the gix stack in Fedora does # not intend to package it, citing upstream discouragement in # https://github.com/Byron/gitoxide/discussions/900. For now, we do without # the extra tests that it would enable. tomcli set Cargo.toml del dev-dependencies.gix-testtools # These tests require gix-testools: rm tests/repo.rs %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{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 %cargo_test %endif %changelog ## START: Generated by rpmautospec * Tue Mar 11 2025 Benjamin A. Beasley - 2.23.1-3 - Rebuilt with rust-cargo_toml 0.22.1; updated License expression * Mon Jan 27 2025 Benjamin A. Beasley - 2.23.1-2 - Loosen MSRV from 1.81.0 to 1.79.0 (for EPEL9) * Fri Jan 24 2025 Benjamin A. Beasley - 2.23.1-1 - Update to 2.23.1 (close RHBZ#2335176) * Sun Jan 19 2025 Fedora Release Engineering - 2.22.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Dec 02 2024 Fabio Valentini - 2.22.0-7 - Bump askalono dependency from 0.4 to 0.5 * Sun Dec 01 2024 Benjamin A. Beasley - 2.22.0-6 - No longer allow old versions of rstest * Wed Nov 20 2024 Benjamin A. Beasley - 2.22.0-5 - Allow rstest 0.23 (and stop allowing 0.18) * Sun Nov 10 2024 Benjamin A. Beasley - 2.22.0-4 - Update the rust-image-0.25 patch to match what was merged upstream - Fewer image formats are now supported. * Fri Oct 04 2024 Benjamin A. Beasley - 2.22.0-3 - Update strum from 0.25.0 to 0.26.3 * Fri Oct 04 2024 Benjamin A. Beasley - 2.22.0-2 - Rebuilt with rust-cargo_toml 0.20.5, which tolerates a new feature syntax * Sun Sep 22 2024 Benjamin A. Beasley - 2.22.0-1 - Update to 2.22.0 (close RHBZ#2313678) * Wed Sep 18 2024 Benjamin A. Beasley - 2.21.0-4 - Update rust2rpm.toml with gix 0.66 fixes * Wed Sep 18 2024 Benjamin A. Beasley - 2.21.0-3 - Add patch upstream status for gix 0.66 patches * Tue Sep 17 2024 blinxen - 2.21.0-2 - Update gix dependency to 0.66 * Sun Sep 01 2024 Benjamin A. Beasley - 2.21.0-1 - Initial package (close RHBZ#2299338) ## END: Generated by rpmautospec