File wireproxy.spec of Package wireproxy

#
# spec file for package wireproxy
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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:           wireproxy
Version:        v1.0.9~git16.9dad356
Release:        0
Summary:	A wireguard client that exposes itself as a socks5/http proxy or tunnels
License:        ISC
URL:            https://github.com/whyvl/wireproxy
Source:         %{name}-%{version}.tar.gz
Source1:	%{name}-go_modules.tar.zst
Source2:	%{name}.obsinfo
BuildRequires:  golang(API) >= 1.21
BuildRequires:	make

%description
wireproxy is a completely userspace application that connects to a wireguard peer, and exposes a socks5/http proxy or tunnels on the machine. This can be useful if you need to connect to certain sites via a wireguard peer, but can't be bothered to setup a new network interface for whatever reasons.


%prep
%autosetup -p1 -a1

sed -i -e 's/TAG :=/TAG ?=/' Makefile

%build
%make_build TAG=$(grep version: %{SOURCE2} | awk '{print $2}'| tr -d ' ')

%install
%{__install} -m 755 -D %{name} %{buildroot}%{_bindir}/%{name}

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}

%changelog

openSUSE Build Service is sponsored by