96 lines
2.7 KiB
RPMSpec
96 lines
2.7 KiB
RPMSpec
# Generated by go2rpm 1.19.0
|
|
%bcond check 1
|
|
|
|
# scancode has a lot of dependencies, so it can be disabled for a faster build
|
|
# or when its deps are unavailable.
|
|
%if %{defined rhel} || "%{_arch}" == "i386"
|
|
%global go_vendor_license_check_disable 1
|
|
%endif
|
|
|
|
%define debug_package %{nil}
|
|
|
|
%global major_version 0
|
|
%global minor_version 15
|
|
%global micro_version 0
|
|
|
|
%global goipath code.gitea.io/tea
|
|
%global forgeurl https://gitea.com/gitea/tea/
|
|
%global tag v%{major_version}.%{minor_version}.%{micro_version}
|
|
|
|
Version: %{major_version}.%{minor_version}.%{micro_version}
|
|
|
|
%gometa -L -f
|
|
%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
|
|
URL: %{gourl}
|
|
# Generated by go-vendor-tools
|
|
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND OFL-1.1
|
|
|
|
Source: %{gosource}
|
|
# Generated by go-vendor-tools
|
|
Source: vendor.tar.bz2
|
|
Source: go-vendor-tools.toml
|
|
|
|
BuildRequires: go >= 1.26.0
|
|
BuildRequires: git go-srpm-macros demus-packaging
|
|
Requires: git
|
|
|
|
%description
|
|
%wordwrap -v common_description
|
|
|
|
%gopkg
|
|
|
|
%prep
|
|
%verify_source_checksum
|
|
%goprep -p1
|
|
%{__tar} -xf %{S:1}
|
|
|
|
%generate_buildrequires
|
|
%go_vendor_license_buildrequires -c %{S:2}
|
|
|
|
|
|
%build
|
|
%global gomodulesmode GO111MODULE=on
|
|
%gobuild -o %{gobuilddir}/bin/tea
|
|
%__mkdir_p %{gobuilddir}/generated
|
|
%{gobuilddir}/bin/%{name} completion bash > %{gobuilddir}/generated/%{name}.bash
|
|
%{gobuilddir}/bin/%{name} completion zsh > %{gobuilddir}/generated/%{name}.zsh
|
|
%{gobuilddir}/bin/%{name} completion fish > %{gobuilddir}/generated/%{name}.fish
|
|
%{gobuilddir}/bin/%{name} man --out %{gobuilddir}/generated/%{name}.1
|
|
|
|
%install
|
|
%go_vendor_license_install -c %{S:2}
|
|
%{__install} -D -m 0755 %{gobuilddir}/bin/tea %{buildroot}%{_bindir}/tea
|
|
%{__install} -D -m 0755 %{gobuilddir}/generated/%{name}.bash %{buildroot}%{bash_completions_dir}/%{name}
|
|
%{__install} -D -m 0755 %{gobuilddir}/generated/%{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name}
|
|
%{__install} -D -m 0755 %{gobuilddir}/generated/%{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish
|
|
%{__install} -D -m 0644 %{gobuilddir}/generated/%{name}.1 %{buildroot}%{_mandir}/1/%{name}.1
|
|
|
|
%check
|
|
%dnl make test
|
|
%go_vendor_license_check -c %{S:2}
|
|
%if %{with check}
|
|
%gotest $(go list ./... | grep -v /tests/)
|
|
%endif
|
|
|
|
%files -f %{go_vendor_license_filelist}
|
|
%doc docs CHANGELOG.md CONTRIBUTING.md README.md
|
|
%{_bindir}/tea
|
|
%{bash_completions_dir}/%{name}
|
|
%{zsh_completions_dir}/_%{name}
|
|
%{fish_completions_dir}/%{name}.fish
|
|
%{_mandir}/1/%{name}.*
|
|
|
|
%changelog
|
|
%autochangelog
|