## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 25 %bcond_without check %global crate b3sum Name: rust-b3sum Version: 1.5.0 Release: %autorelease Summary: Command line implementation of the BLAKE3 hash function License: Apache-2.0 URL: https://crates.io/crates/b3sum Source: %{crates_source} # Get the top-level license file from the commit corresponding to the 1.5.0 # release. We filed a PR to fix this: # Fix missing LICENSE file in b3sum crate # https://github.com/BLAKE3-team/BLAKE3/pull/371 Source1: https://github.com/BLAKE3-team/BLAKE3/raw/%{version}/LICENSE # Manually created patch for downstream crate metadata changes # - Remove CC0-1.0 option (not allowed for code in Fedora) from license # expression (but note that LICENSE still includes CC0-1.0 text); see # https://docs.fedoraproject.org/en-US/legal/spdx/#_spdx_license_expressions_in_fedora_license_data Patch: b3sum-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: help2man %global _description %{expand: A command line implementation of the BLAKE3 hash function.} %description %{_description} %package -n %{crate} Summary: %{summary} # Apache-2.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause # CC0-1.0 OR Apache-2.0 # CC0-1.0 OR MIT-0 OR Apache-2.0 # MIT # MIT OR Apache-2.0 License: %{shrink: Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (MIT-0 OR Apache-2.0) AND MIT } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %doc what_does_check_do.md %{_bindir}/b3sum %{_mandir}/man1/b3sum.1* %prep %autosetup -n %{crate}-%{version} -p1 cp -p '%{SOURCE1}' . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies help2man --no-info --output=b3sum.1 target/rpm/b3sum %install %cargo_install install -t %{buildroot}%{_mandir}/man1 -D -p -m 0644 b3sum.1 %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 1.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Benjamin A. Beasley - 1.5.0-1 - Initial package (close RHBZ#2258652) ## END: Generated by rpmautospec