# force single job compilation #%%define _smp_mflags -j1 #%%undefine _include_frame_pointers %global debug_package %{nil} %global gitdate 20260116 %global commit xxx %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global version 0.4.0 %global release 1 # set this to "1" if building a git/beta/rc release %global beta_or_rc 0 #============================================================================= # general #----------------------------------------------------------------------------- Name: forgejo-cli Version: %{version} %if %{beta_or_rc} Release: 0.%{release}.%{gitdate}.git%{shortcommit}%{?dist} %else Release: %{release}%{?dist} %endif Summary: CLI application for interacting with Forgejo License: Apache-2.0 OR MIT URL: https://codeberg.org/forgejo-contrib/forgejo-cli %if %{beta_or_rc} Source0: https://codeberg.org/forgejo-contrib/forgejo-cli/%{commit}/%{name}-v%{version}-git%{shortcommit}.tar.gz %else Source0: https://codeberg.org/forgejo-contrib/forgejo-cli/archive/v%{version}.tar.gz#/%{name}-v%{version}.tar.gz %endif BuildRequires: cargo BuildRequires: cargo-rpm-macros BuildRequires: gcc BuildRequires: rust %description fj, a CLI client for Forgejo ... akin to gh, glab, or tea! You can... Open, edit, comment on, close issues Create and merge pull requests Easily create AGit pull requests, no need to fork! Create, star, watch, and edit repositories Manage organizations and teams Publish new releases %prep %if %{beta_or_rc} %autosetup -p1 -n %{name} %else %autosetup -p1 -n %{name} %endif %build # add CARGO_BUILD_JOBS=1 to use only one CPU /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' cargo build --release %install install -D -m 0755 target/release/fj %{buildroot}%{_bindir}/fj %files %license LICENSE-APACHE LICENSE-MIT %doc README.md %attr(0755,root,root) %{_bindir}/fj %changelog * Fri Jan 16 2026 Patrick Laimbock - 0.4.0-1 - initial release for Fedora 43