1
0

net-vpn/frp: treeclean

This commit is contained in:
Puqns67 2024-04-29 12:54:42 +08:00
parent a66f37d883
commit 9f891e25d9
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
7 changed files with 0 additions and 137 deletions

View File

@ -1,2 +0,0 @@
DIST frp-0.55.1-deps.tar.xz 47557468 BLAKE2B 4d0621f766afe110d92bd6d6784895c5d224825ba0c0af520b5bb7ad06c4ce13828ecbc3d2a5434a3832747bc454d599938999c357321dfc2b38465122a24ab5 SHA512 cd0781e0972149a0d3f3480fd488f8f388eee8d5e18f79ed183c535dca2fec6f8146a73395160e6b3837fd57ce2c919afcc65ab33cdbd87155f90440691d0168
DIST frp-0.55.1.tar.gz 1077932 BLAKE2B 01cb20a14f21d6e90b8e41bb36832224760cfe93592c84ed24fb467d9303b5d026fb6733373f81e9241b2d7346fded2190e4eeceb09b114f66451369562077ea SHA512 fa9c8b82d56f9d404bb2a0e7027763550756f178424e99713cab01f613da00d04f03bd917718b9cefcdbb26090024c118a9401e2800bc6d076fdc50b61cf167a

View File

@ -1,14 +0,0 @@
[Unit]
Description=Frp Client Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/frpc -c /etc/frp/frpc.toml
[Install]
WantedBy=multi-user.target

View File

@ -1,14 +0,0 @@
[Unit]
Description=Frp Client Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/frpc -c /etc/frp/%i.toml
[Install]
WantedBy=multi-user.target

View File

@ -1,14 +0,0 @@
[Unit]
Description=Frp Server Service
After=network.target
Wants=network.target
[Service]
Type=simple
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/frps -c /etc/frp/frps.toml
[Install]
WantedBy=multi-user.target

View File

@ -1,14 +0,0 @@
[Unit]
Description=Frp Server Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/frps -c /etc/frp/%i.toml
[Install]
WantedBy=multi-user.target

View File

@ -1,64 +0,0 @@
# Copyright 1999-2024 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 )"
src_compile() {
mkdir -pv comp || die
if use client; then
ego build -trimpath -ldflags "-s -w" -tags frpc -o frpc ./cmd/frpc
./frpc completion bash > comp/frpc || die
./frpc completion fish > comp/frpc.fish || die
./frpc completion zsh > comp/_frpc || die
fi
if use server; then
ego build -trimpath -ldflags "-s -w" -tags frps -o frps ./cmd/frps
./frps completion bash > comp/frps || die
./frps completion fish > comp/frps.fish || die
./frps completion zsh > comp/_frps || die
fi
}
src_install() {
_install() {
# Install binary file
dobin "${1}"
# Install completion files
dobashcomp "${S}/comp/${1}"
dofishcomp "${S}/comp/${1}.fish"
dozshcomp "${S}/comp/_${1}"
# Install systemd services
systemd_dounit "${FILESDIR}/${1}.service"
systemd_newunit "${FILESDIR}/${1}_at.service" "${1}@.service"
# Install config files
insinto "/etc/${PN}"
newins "${S}/conf/${1}.toml" "${1}.toml.example"
newins "${S}/conf/${1}_full_example.toml" "${1}_full.toml.example"
}
if use client; then
_install frpc
fi
if use server; then
_install frps
fi
}

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>me@puqns67.icu</email>
<name>Puqns67</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>
</pkgmetadata>