mirror of
https://abf.rosa.ru/djam/gopls.git
synced 2025-02-22 09:43:00 +00:00
57 lines
1.1 KiB
RPMSpec
57 lines
1.1 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
%define secscan 0
|
|
|
|
Name: gopls
|
|
Version: 0.18.0
|
|
Release: 1
|
|
Summary: Go language server
|
|
URL: https://golang.org/x/tools
|
|
Source0: https://github.com/golang/tools/archive/gopls/v%{version}/%{name}-%{version}.tar.gz
|
|
License: BSD
|
|
Group: Development/Other
|
|
BuildRequires: go
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
%if %{secscan}
|
|
BuildRequires: clamav
|
|
BuildRequires: trivy
|
|
%endif
|
|
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
|
|
%description
|
|
gopls (pronounced "Go please") is the official Go language
|
|
server developed by the Go team. It provides IDE features
|
|
to any LSP-compatible editor.
|
|
|
|
%prep
|
|
%setup -qn tools-%{name}-v%{version}
|
|
%if %{secscan}
|
|
clamscan -ir .
|
|
trivy fs --scanners vuln --format cosign-vuln .
|
|
%endif
|
|
|
|
|
|
%build
|
|
export GOPROXY=https://proxy.golang.org/cached-only
|
|
pushd gopls
|
|
go build --ldflags="-s -w" -o ../bin/%{name} .
|
|
popd
|
|
|
|
upx bin/%{name}
|
|
|
|
%install
|
|
install -Dm0755 ./bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
%files
|
|
%doc %{name}/README.md %{name}/doc LICENSE
|
|
%{_bindir}/%{name}
|
|
|
|
%check
|
|
export GOPROXY=https://proxy.golang.org/cached-only
|
|
#go test ./...
|
|
|
|
%if %{secscan}
|
|
clamscan -ir %{buildroot}
|
|
%endif
|