diff --git a/.gitignore b/.gitignore index 76fb70f..b23b0d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /wgctrl-go-28f4e240be2d40c8ae16f3bbc8f05c8ee57fc554.tar.gz /wgctrl-go-bd2cb7843e1b98193f01eb288793e741a814a269.tar.gz /wgctrl-go-4253848d036c7873fa1fbdfbc2d10ff15dc81ccb.tar.gz -/wgctrl-go-a9ab2273dd1075ea74b88c76f8757f8b4003fcbf.tar.gz -/wgctrl-go-a9ab2273dd1075ea74b88c76f8757f8b4003fcbf-vendor.tar.bz2 diff --git a/go-vendor-tools.toml b/go-vendor-tools.toml deleted file mode 100644 index 6ab4062..0000000 --- a/go-vendor-tools.toml +++ /dev/null @@ -1,4 +0,0 @@ -[archive] - -[licensing] -detector = "askalono" diff --git a/sources b/sources index 93e2360..fe425cd 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (wgctrl-go-a9ab2273dd1075ea74b88c76f8757f8b4003fcbf.tar.gz) = 2ae83df64642865e1371635654c7fd056fd2136a86a62ec62b30cb5bdf23c1292774c68cdf6a8f484ba5aa0722b9fd7dfcac43f31f29d658bfca44a844ec4903 -SHA512 (wgctrl-go-a9ab2273dd1075ea74b88c76f8757f8b4003fcbf-vendor.tar.bz2) = dd5090e40e7091e281736e1eb217ff1e93fbc984e1e7559a65071bf4ea0a0a3f01a3466c9b4fd0667e14e9527851e65d6efd4b5ea1c5149e8f37a4972e6f8fcf +SHA512 (wgctrl-go-4253848d036c7873fa1fbdfbc2d10ff15dc81ccb.tar.gz) = 3663a572f79800ddc837e3c9971f0097e67bddbecfd1d2b9e60711fde2b4e65c1dac56f1bf3f9b8933f2fa9e3bed276deefccced8840666ac42bbd48eca802be diff --git a/wgctrl.spec b/wgctrl.spec index 40270e7..a4913d0 100644 --- a/wgctrl.spec +++ b/wgctrl.spec @@ -1,60 +1,73 @@ -# Generated by go2rpm 1.19.0 -%bcond check 1 +# Generated by go2rpm 1 +%bcond_without check # https://github.com/WireGuard/wgctrl-go %global goipath golang.zx2c4.com/wireguard/wgctrl %global forgeurl https://github.com/WireGuard/wgctrl-go -%global commit a9ab2273dd1075ea74b88c76f8757f8b4003fcbf +%global commit 4253848d036c7873fa1fbdfbc2d10ff15dc81ccb -%gometa -L -f +%gometa +%global goname wgctrl -Name: wgctrl +%global common_description %{expand: +Package Wgctrl enables control of WireGuard interfaces on multiple platforms.} + +%global golicenses LICENSE.md +%global godocs CONTRIBUTING.md README.md + +Name: %{goname} Version: 0 Release: %autorelease -p -Summary: Package wgctrl enables control of WireGuard interfaces on multiple platforms +Summary: Control of WireGuard interfaces on multiple platforms -# Generated by go-vendor-tools -License: BSD-2-Clause AND BSD-3-Clause AND MIT +License: MIT URL: %{gourl} Source0: %{gosource} -# Generated by go-vendor-tools -Source1: %{archivename}-vendor.tar.bz2 -Source2: go-vendor-tools.toml -BuildRequires: go-vendor-tools +BuildRequires: golang(github.com/mdlayher/genetlink) +BuildRequires: golang(github.com/mdlayher/netlink) +BuildRequires: golang(github.com/mdlayher/netlink/nlenc) +BuildRequires: golang(golang.org/x/crypto/curve25519) +BuildRequires: golang(golang.org/x/sys/unix) + +%if %{with check} +# Tests +BuildRequires: golang(github.com/google/go-cmp/cmp) +BuildRequires: golang(github.com/mdlayher/genetlink/genltest) +BuildRequires: golang(github.com/mdlayher/netlink/nltest) +BuildRequires: golang(github.com/mikioh/ipaddr) +%endif %description -Package wgctrl enables control of WireGuard interfaces on multiple platforms. +%{common_description} + +%gopkg %prep -%goprep -p1 -tar -xf %{S:1} - -%generate_buildrequires -%go_vendor_license_buildrequires -c %{S:2} +%goprep %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} +%gopkginstall 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 ./... +%check +%gocheck %endif -%files -f %{go_vendor_license_filelist} +%files +%license LICENSE.md %doc CONTRIBUTING.md README.md -%{_bindir}/wgctrl +%{_bindir}/* +%gopkgfiles %changelog %autochangelog