# Generated by go2rpm 1.14.0 %bcond check 1 %bcond bootstrap 0 %if %{with bootstrap} %global debug_package %{nil} %endif %if %{with bootstrap} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ %endif # Use git snapshot since no releases exist yet %global commit ed7da8aeed726abb9cb0603efa83b693b91d3159 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20250121 # https://github.com/Fabric-Development/fabric-cli %global goipath github.com/Fabric-Development/fabric-cli Version: 0.0.1~git%{snapdate}.%{shortcommit} %gometa -L -f %global common_description %{expand: An alternative CLI utility for Fabric to maximize performance. This project is written in Go and provides shell completions and interactive mode features.} %global golicenses LICENSE %global godocs README.md Name: fabric-cli Release: %autorelease Summary: Alternative high-performance CLI utility for Fabric License: AGPL-3.0-or-later URL: %{gourl} # Use master branch snapshot since no releases exist Source: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz Source1: bundle_go_deps_for_rpm.sh BuildRequires: meson BuildRequires: ninja-build Requires: dbus # This utility requires Fabric to be running Recommends: fabric %description %{common_description} %prep %autosetup -n %{name}-%{commit} %autopatch -p1 %if %{without bootstrap} %generate_buildrequires %go_generate_buildrequires %endif %if %{without bootstrap} %build %gobuild -o %{gobuilddir}/bin/fabric-cli %{goipath} %endif %install %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Install shell completions if they exist if [ -d autocompletions ]; then install -Dpm644 autocompletions/bash_autocomplete %{buildroot}%{_datadir}/bash-completion/completions/fabric-cli install -Dpm644 autocompletions/zsh_autocomplete %{buildroot}%{_datadir}/zsh/site-functions/_fabric-cli install -Dpm644 autocompletions/fish_autocomplete %{buildroot}%{_datadir}/fish/vendor_completions.d/fabric-cli.fish fi %endif %if %{without bootstrap} %if %{with check} %check %gocheck %endif %endif %if %{without bootstrap} %files %license LICENSE %doc README.md %{_bindir}/fabric-cli # Only include completion files if they exist %if 0%{?bash_completions_dir:1} %{_datadir}/bash-completion/completions/fabric-cli %endif %if 0%{?fish_completions_dir:1} %{_datadir}/fish/vendor_completions.d/fabric-cli.fish %endif %if 0%{?zsh_completions_dir:1} %{_datadir}/zsh/site-functions/_fabric-cli %endif %endif %changelog %autochangelog