File wireguard-go.spec of Package wireguard-go
# Generated by go2rpm 1.9.0
%bcond_without check
# https://git.zx2c4.com/wireguard-go
%global goipath golang.zx2c4.com/wireguard
%global forgeurl https://git.zx2c4.com/wireguard-go
%global commit 12269c2761734b15625017d8565745096325392f
%global shortcommit 12269c27
Version: 0.0.20231211~git%{shortcommit}
%global archivename wireguard-go-%{commit}
%global topdir %{archivename}
%gometa -f
%global goname wireguard-go
%global common_description %{expand:
Go implementation of WireGuard VPN tunnel in userspace.}
%global golicenses LICENSE
%global godocs README.md
Name: %{goname}
Release: 1%{?dist}
Summary: Go implementation of WireGuard VPN tunnel in userspace
License: MIT
URL: %{gourl}
Source0: %{forgeurl}/snapshot/%{archivename}.tar.xz
Patch1: wireguard-go-newer_gvisor.patch
BuildRequires: go-rpm-macros
%description
%{common_description}
%gopkg
%prep
%goprep
%autopatch -p1
%generate_buildrequires
%go_generate_buildrequires
%build
%gobuild -o %{gobuilddir}/bin/wireguard-go %{goipath}
%install
%gopkginstall -v
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%gopkgfiles