# Generated by go2rpm %bcond check 1 # https://github.com/golang/tools %global goipath golang.org/x/tools/gopls %global forgeurl https://github.com/golang/tools Version: 0.16.2 %global tag gopls/v%{version} %{lua: rpm.define("safe_tag " .. string.gsub(rpm.expand("%tag"), "/", "-"))} %global distprefix %{nil} %gometa -L -f %global common_description %{expand: gopls (pronounced "Go please") is the official Go language server developed by the Go team. It provides IDE features to any LSP-compatible editor. You should not need to interact with gopls directly--it will be automatically integrated into your editor. The specific features and settings vary slightly by editor, so we recommend that you proceed to the documentation for your editor.} %global golicenses LICENSE PATENTS %global godocs CONTRIBUTING.md gopls/README.md Name: gopls Release: %autorelease Summary: gopls, the Go language server License: BSD-3-Clause URL: %{gourl} Source: %{gosource} Patch: 0001-Skip-tests-that-require-module-mode.patch Obsoletes: golang-x-tools-gopls < 1:0.22.0-3 Provides: golang-x-tools-gopls = %{version}-%{release} %description %{common_description} %prep %goprep -A %autopatch -p1 # Created by goprep, but with the wrong path, so re-create it. rm -r _build/src/golang.org/x/tools # mkdir -p _build/src/golang.org/x ln -fs %{_builddir}/tools-%{safe_tag} _build/src/golang.org/x/tools %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/gopls %{goipath} %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check %gocheck -t internal/cmd -t internal/lsp/cache -t internal/telemetry %endif %files %license LICENSE PATENTS %doc CONTRIBUTING.md gopls/README.md %{_bindir}/gopls %changelog %autochangelog