1 %define vendor_version 0.12.2
3 Summary: Official Go language server developed by the Go team
8 Group: Development/Tools
9 Source0: https://github.com/golang/tools/archive/gopls/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5: 76ff68c87ab64ad1140382e77d6722ab
11 Source1: %{name}-vendor-%{vendor_version}.tar.xz
12 # Source1-md5: c15d029d1e15e64b659ed1a40f5dae28
13 URL: https://pkg.go.dev/golang.org/x/tools/gopls
14 BuildRequires: golang >= 1.18
15 BuildRequires: rpmbuild(macros) >= 2.009
16 BuildRequires: tar >= 1:1.22
18 ExclusiveArch: %go_arches
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _debugsource_packages 0
24 gopls (pronounced "Go please") is the official Go language server
25 developed by the Go team. It provides IDE features to any
26 LSP-compatible editor.
29 %setup -q -n tools-%{name}-v%{version} -a1
35 %__go build -v -mod=vendor -o target/gopls
38 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT%{_bindir}
42 cp -p gopls/target/gopls $RPM_BUILD_ROOT%{_bindir}/gopls
45 rm -rf $RPM_BUILD_ROOT
47 %defattr(644,root,root,755)
48 %doc gopls/doc/*.md gopls/README.md
49 %attr(755,root,root) %{_bindir}/gopls