File wgcf.spec of Package wgcf

#
# spec file for package wgcf
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

Name: wgcf
Version: 2.2.22
License: MIT
Release: 2
URL: https://github.com/ViRb3/wgcf
Summary: Unoffical client for CloudFlare WARP
Group: Productivity/Networking/Other
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires:  golang-packaging
BuildRoot: /tmp/%{name}-%{version}

%description
wgcf is an unofficial, cross-platform CLI for Cloudflare Warp
https://github.com/ViRb3/wgcf
.
%prep
%setup -q
%setup -q -T -D -a 1

%check

%build
go build \
  -buildmode=pie \
  -mod=vendor \
  -ldflags "-s -w -X main.version=%{version}"

%install
mkdir -p %{buildroot}%{_bindir}
install -m 0755 wgcf %{buildroot}%{_bindir}

%files
%{_bindir}/wgcf

%changelog
openSUSE Build Service is sponsored by