File golang-github-rogpeppe-godef.spec of Package golang-github-rogpeppe-godef
#
# spec file for package golang-github-rogpeppe-gocode
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{bcond_with source}
%global provider github
%global provider_tld com
%global project rogpeppe
%global repo godef
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global name golang-%{provider}-%{project}-%{repo}
Name: %name
Version: 1.1.2
Release: 0
License: BSD-3-Clause
Summary: Find symbol information in Go source
Url: https://github.com/%{project}/%{repo}
Group: Development/Languages/Golang
Source0: https://github.com/rogpeppe/godef/archive/refs/tags/v1.1.2.tar.gz#/%{name}-%{version}.tar.xz
Source1: %{repo}.1
BuildRequires: golang-packaging
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{go_provides}
%description
Godef, given an expression or a location in a source file, prints the
location of the definition of the symbol referred to.
%prep
%setup -q -n %{repo}-%{version}
%goprep %import_path
%build
%gobuild -mod=vendor ...
%install
mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 %{_sourcedir}/%{repo}.1 %{buildroot}%{_mandir}/man1/%{repo}.1
%goinstall
%{?with_source %gosrc}
rm -rvf %{buildroot}/%{_libdir}
%{?with_source %gofilelist}
%files %{?with_source -f file.lst}
%defattr(-,root,root)
%doc LICENSE README
%{_mandir}/man1/*
%{_bindir}/godef
%changelog