File golang-l3t.spec of Package golang-l3t

# spec file for package golang
# Copyright (c) 2018 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

%global provider        github
%global provider_tld    com
%global project         bhdn
%global repo            golang-l3t
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}

Name:           golang-l3t
Version:        0.0.1
Release:        0
Summary:        This is l3t
License:        LGPL-3.0
Group:          Development/Languages/Other
Url:            https://%{provider_prefix}
Source0:        %{repo}-%{version}.tar.gz
Source1:	vendor.tar.gz
Conflicts:      l3t
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  golang-packaging
BuildRequires:  fdupes


l3t in golang

%setup -q
tar xf %{SOURCE1}
rm -f go.{mod,sum}

%goprep %{import_path}
%gobuild l3t/

%__install -D -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/bash_completion.d/
for alias in bzag bze bzg bzo l3ac l3an l3as l3g l3ls l3n l3o l3p l3s l3se l3srg l3t-ptf-create l3t-make-sr-links l3t-split-supportconfig l3t-showrc l3z; do
  %__ln_s %{_bindir}/l3t %{buildroot}%{_bindir}/$alias