60 lines
1.4 KiB
RPMSpec
60 lines
1.4 KiB
RPMSpec
# Generated by go2rpm 1.19.0
|
|
%bcond check 1
|
|
|
|
# https://github.com/WireGuard/wgctrl-go
|
|
%global goipath golang.zx2c4.com/wireguard/wgctrl
|
|
%global forgeurl https://github.com/WireGuard/wgctrl-go
|
|
%global commit a9ab2273dd1075ea74b88c76f8757f8b4003fcbf
|
|
|
|
%gometa -L -f
|
|
|
|
|
|
Name: wgctrl
|
|
Version: 0
|
|
Release: %autorelease -p
|
|
Summary: Package wgctrl enables control of WireGuard interfaces on multiple platforms
|
|
|
|
# Generated by go-vendor-tools
|
|
License: BSD-2-Clause AND BSD-3-Clause AND MIT
|
|
URL: %{gourl}
|
|
Source0: %{gosource}
|
|
# Generated by go-vendor-tools
|
|
Source1: %{archivename}-vendor.tar.bz2
|
|
Source2: go-vendor-tools.toml
|
|
|
|
BuildRequires: go-vendor-tools
|
|
|
|
%description
|
|
Package wgctrl enables control of WireGuard interfaces on multiple platforms.
|
|
|
|
%prep
|
|
%goprep -p1
|
|
tar -xf %{S:1}
|
|
|
|
%generate_buildrequires
|
|
%go_vendor_license_buildrequires -c %{S:2}
|
|
|
|
%build
|
|
%global gomodulesmode GO111MODULE=on
|
|
for cmd in cmd/* ; do
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
done
|
|
|
|
%install
|
|
%go_vendor_license_install -c %{S:2}
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
|
%check
|
|
%go_vendor_license_check -c %{S:2}
|
|
%if %{with check}
|
|
%gotest ./...
|
|
%endif
|
|
|
|
%files -f %{go_vendor_license_filelist}
|
|
%doc CONTRIBUTING.md README.md
|
|
%{_bindir}/wgctrl
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|