summaryrefslogtreecommitdiff
path: root/net-proxy/wireproxy/wireproxy-1.1.3-r3.ebuild
blob: b6c5acb304a0373a9b6858f6192c889895a31fca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module

DESCRIPTION="Wireguard client that exposes itself as a proxy"
HOMEPAGE="https://github.com/whyvl/wireproxy"
SRC_URI="https://github.com/whyvl/wireproxy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/iguanajuice/guru-distfiles/raw/refs/heads/main/net-proxy/wireproxy/${P}-vendor.tar.xz"
LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"

BDEPEND=">=dev-lang/go-1.26.0"

DOCS=(
	README.md
	UseWithVPN.md
)

src_compile() {
	ego build -ldflags "-X 'main.version=${PV}'" ./cmd/wireproxy
}

src_install() {
	einstalldocs
	dobin wireproxy
	newinitd "${FILESDIR}/wireproxy.initd" wireproxy

	# Avoid world-readability of config file that can contain credentials
	insinto /etc
	insopts -m0640
	newins - wireproxy.conf <<< ""
}