# Generated by rust2rpm 27 %bcond check 1 %global crate forgejo-cli Name: forgejo-cli Version: 0.2.0 Release: %autorelease Summary: CLI tool for Forgejo License: Apache-2.0 OR MIT URL: https://crates.io/crates/forgejo-cli Source: %{crates_source} BuildRequires: cargo-rpm-macros >= 24 BuildRequires: openssl-devel BuildRequires: zlib-devel %global _description %{expand: CLI tool for Forgejo.} # Oniguruma fails to compile because gcc15 defaults to std=gnu23 %if 0%{?fedora} >= 42 %global optflags %{optflags} -std=gnu17 %endif %description %{_description} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %doc README.md %{_bindir}/fj %prep %autosetup -n %{crate}-%{version} -p1 # rust version too low for EPEL 9 and below %if 0%{?el8} || 0%{?el9} bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) --profile=minimal -y %define __rustc $HOME/.cargo/bin/rustc %define __cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' "$HOME/.cargo/bin/cargo" %define __rustdoc $HOME/.cargo/bin/rustdoc %endif cargo vendor %cargo_prep -v vendor %generate_buildrequires # %%cargo_generate_buildrequires %build %cargo_build %{cargo_license} > LICENSE.dependencies %install %define cargo_install_lib 0 %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog