summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/frp')
-rw-r--r--net-vpn/frp/Manifest2
-rw-r--r--net-vpn/frp/frp-0.53.2.ebuild65
-rw-r--r--net-vpn/frp/metadata.xml4
3 files changed, 71 insertions, 0 deletions
diff --git a/net-vpn/frp/Manifest b/net-vpn/frp/Manifest
index 9cbbd7f464da..16937c6e937e 100644
--- a/net-vpn/frp/Manifest
+++ b/net-vpn/frp/Manifest
@@ -3,3 +3,5 @@ DIST frp-0.42.0.tar.gz 1280863 BLAKE2B 5377aeb7ef83ace3a36772bf56ab671a91688da6d
DIST frp-0.43.0.tar.gz 1282855 BLAKE2B d2e60e89de8823ae129f91aa2cf50fe5101bcc3c42d63fde48febf89cb2511e5ecabaf799803cf6ba0042b523ef1a3de19fb7d027a34074df0ccb40ba8393b86 SHA512 e6ccbf98d9d8fb714f37784ca582684b9f27994cf3f74b7081043285394243a8e9114b65f0918b64207a99064422312d700d01adaed085175314ad0ae238eb8f
DIST frp-0.44.0.tar.gz 1284095 BLAKE2B 35464acd0dcdf3eeeb326c612eeef457baad5a8a7eb36a28183fd3dd1f1eb585914ed290a0897928244ac1319f45358c0b19ae3606cb149501c7ead79ba2e26e SHA512 6a5d0f4985075e260bc7970031391b457a3c7b8ea05628f17b551ea9afc0f2454db76caaad49250a2aecdd7ca26abc8ff74ee705a4c44319d33a92e5c055fd56
DIST frp-0.45.0-vendor.tar.gz 5301832 BLAKE2B 23198a326678f3ec5357ce1bd6c7abff26a27dce6810653ef0262fb3f5c68165481ec75218ded64c90a357fafefba11b0a9c0afc4dc7e3a229ad8cc245a76fc3 SHA512 b94dd5adec82ae940044d448ec4551ca24ec3c8f1a9d870327a76a9a7d3b39e7dc567199a999b85879637dca3d46df65f8f46d11c3dbe10653a20f2eb7521f9a
+DIST frp-0.53.2-deps.tar.xz 55621188 BLAKE2B 35e14b82bbc3a3386f2901a274969e7650cf6ce529ae17dd7ab0a7f759f355da7b7d64d0945e22d3a741d75ff3e21bd17ccf708d2184605c9303b35dc63f1b88 SHA512 c173d1d1918afc5549d99ac575eadd2b408220625c773ec5f5cce4e00a648c19d9a3cfbfce51a86e0e8425edb7a1a72a9d798a37f4bf37b38c0d4d031bc27dae
+DIST frp-0.53.2.tar.gz 1023383 BLAKE2B bad6aee65d5386ba14a0c4679514e17e1643b703292a4bb0811ff1f9a76b95833358993fdfb13b1e4224d7cf8c0035c2aabfdcd74a14003dff90c3e569fa5d12 SHA512 c1f0acff002dbdef001d04c3dcd5ca138c33a36b8e5ad119a555f0dd05f4e6200c915e1481eab58c02e650a058f0b3f75310b9a50ad4756087f69f9fe74377b4
diff --git a/net-vpn/frp/frp-0.53.2.ebuild b/net-vpn/frp/frp-0.53.2.ebuild
new file mode 100644
index 000000000000..15c8d46a922a
--- /dev/null
+++ b/net-vpn/frp/frp-0.53.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd shell-completion
+
+DESCRIPTION="A reverse proxy that exposes a server behind a NAT or firewall to the internet"
+HOMEPAGE="https://github.com/fatedier/frp"
+SRC_URI="https://github.com/fatedier/frp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/Puqns67/gentoo-deps/releases/download/${P}/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~riscv"
+IUSE="+client server"
+REQUIRED_USE="|| ( client server )"
+
+DEPEND="${RDEPEND}"
+RDEPEND=""
+BDEPEND="dev-lang/go"
+
+src_compile() {
+ mkdir -pv completions || die
+
+ if use client; then
+ ego build -trimpath -ldflags "-w" -o frpc ./cmd/frpc
+ ./frpc completion bash > completions/frpc || die
+ ./frpc completion fish > completions/frpc.fish || die
+ ./frpc completion zsh > completions/_frpc || die
+ fi
+
+ if use server; then
+ ego build -trimpath -ldflags "-w" -o frps ./cmd/frps
+ ./frps completion bash > completions/frps || die
+ ./frps completion fish > completions/frps.fish || die
+ ./frps completion zsh > completions/_frps || die
+ fi
+}
+
+src_install() {
+ if use client; then
+ dobin frpc
+ dobashcomp completions/frpc
+ systemd_dounit "${FILESDIR}/frpc.service"
+ systemd_newunit "${FILESDIR}/frpc_at_.service" frpc@.service
+
+ for x in conf/frpc*.toml; do mv "${x}"{,.example}; done
+ fi
+
+ if use server; then
+ dobin frps
+ dobashcomp completions/frps
+ systemd_dounit "${FILESDIR}/frps.service"
+ systemd_newunit "${FILESDIR}/frps_at_.service" frps@.service
+
+ for x in conf/frps*.toml; do mv "${x}"{,.example}; done
+ fi
+
+ insinto /etc/frp
+ doins conf/*.example
+
+ dofishcomp completions/*.fish
+ dozshcomp completions/_*
+}
diff --git a/net-vpn/frp/metadata.xml b/net-vpn/frp/metadata.xml
index f8c537b68111..29fb056dd278 100644
--- a/net-vpn/frp/metadata.xml
+++ b/net-vpn/frp/metadata.xml
@@ -5,6 +5,10 @@
<email>zmedico@gentoo.org</email>
<name>Zac Medico</name>
</maintainer>
+ <use>
+ <flag name="client">Build and install frp client (frpc)</flag>
+ <flag name="server">Build and install frp server (frps)</flag>
+ </use>
<upstream>
<remote-id type="github">fatedier/frp</remote-id>
</upstream>