Include docs, license and completions

This commit is contained in:
2026-05-18 13:55:30 +02:00
parent 839e234523
commit 189fe04eb2
+34 -11
View File
@@ -1,16 +1,30 @@
# TODO: Add the autocomplete scripts
%global major_version 0
%global minor_version 9
%global micro_version 2
%global goipath code.gitea.io/tea
%global forgeurl https://gitea.com/gitea/tea/
%global tag v%{major_version}.%{minor_version}.%{micro_version}
%define debug_package %{nil}
Name: tea
Version: %{major_version}.%{minor_version}.%{micro_version}
Version: %{major_version}.%{minor_version}.%{micro_version}
%gometa
%global _docdir_fmt %{name}
%global golicenses DCO LICENSE
%global common_description %{expand:
Tea is the official CLI tool for Gitea. It can be used to manage most entities
on one or more Gitea instances and provides local helpers like
'tea pull checkout'
}
Name: tea
Release: %autorelease
Summary: The official CLI for Gitea
License: MIT
URL: https://gitea.com/gitea/tea
Source0: https://gitea.com/gitea/tea/archive/v%{version}.tar.gz
URL: %{gourl}
License: MIT
Source0: %{gosource}
BuildRequires: go >= 1.16.0
BuildRequires: git
@@ -19,22 +33,31 @@ BuildRequires: go-srpm-macros
Requires: git
%description
Tea is the official CLI tool for Gitea. It can be used to manage most entities
on one or more Gitea instances and provides local helpers like
'tea pull checkout'
%wordwrap -v common_description
%gopkg
%prep
%setup -q -n %{name}
%goprep
%build
go mod vendor
make
%install
install -D -m 755 tea $RPM_BUILD_ROOT%{_bindir}/tea
install -D -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -D -m 644 contrib/autocomplete.sh $RPM_BUILD_ROOT%{bash_completions_dir}/%{name}
install -D -m 644 contrib/autocomplete.zsh $RPM_BUILD_ROOT%{zsh_completions_dir}/_%{name}
%check
make test
%files
%license %{golicenses}
%doc
%{_bindir}/tea
%{bash_completions_dir}/%{name}
%{zsh_completions_dir}/_%{name}
%changelog
%autochangelog