From: Jan Palus Date: Thu, 21 Apr 2022 07:03:16 +0000 (+0200) Subject: new X-Git-Tag: auto/th/gopls-0.8.3-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=6ed56adf37fda7770a8e0df5f182078a858e7adf;p=packages%2Fgopls.git new --- 6ed56adf37fda7770a8e0df5f182078a858e7adf diff --git a/gopls.spec b/gopls.spec new file mode 100644 index 0000000..b44bd66 --- /dev/null +++ b/gopls.spec @@ -0,0 +1,49 @@ +%define vendor_version 0.8.3 + +Summary: Official Go language server developed by the Go team +Name: gopls +Version: 0.8.3 +Release: 1 +License: BSD +Group: Development/Tools +Source0: https://github.com/golang/tools/archive/gopls/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: c045731d22badb72ac56e0646542de39 +Source1: %{name}-vendor-%{vendor_version}.tar.xz +# Source1-md5: c8c7bd94014949884d99be260dc8f26e +URL: https://pkg.go.dev/golang.org/x/tools/gopls +BuildRequires: golang >= 1.18 +BuildRequires: rpmbuild(macros) >= 2.009 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz +ExclusiveArch: %go_arches +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define _debugsource_packages 0 + +%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 -q -n tools-%{name}-v%{version} -a1 + +%{__mkdir} .go-cache + +%build +cd gopls +%__go build -v -mod=vendor -o target/gopls + +%install +rm -rf $RPM_BUILD_ROOT + +install -d $RPM_BUILD_ROOT%{_bindir} + +cp -p gopls/target/gopls $RPM_BUILD_ROOT%{_bindir}/gopls + +%clean +rm -rf $RPM_BUILD_ROOT +%files +%defattr(644,root,root,755) +%doc gopls/doc/*.md gopls/README.md +%attr(755,root,root) %{_bindir}/gopls