www-client/brave-bin: version bump to 1.65.126 and fix some pkgcheck warning
[gentoo-zh.git] / net-proxy / v2ray / v2ray-5.15.1.ebuild
blob6fe56c6710e579357b3a69281a2834497735cda7
1 # Copyright 2021-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit systemd go-module
8 DESCRIPTION="A platform for building proxies to bypass network restrictions."
9 HOMEPAGE="https://www.v2fly.org/"
10 SRC_URI="https://github.com/v2fly/v2ray-core/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
11 https://github.com/Puqns67/gentoo-deps/releases/download/${P}/${P}-deps.tar.xz"
13 S="${WORKDIR}/${PN}-core-${PV}"
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86"
19 RESTRICT="mirror"
21 RDEPEND="!net-proxy/v2ray-bin
22 app-alternatives/v2ray-geoip
23 app-alternatives/v2ray-geosite"
24 BDEPEND=">=dev-lang/go-1.21.4"
26 src_prepare() {
27 sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' release/config/systemd/system/*.service || die
28 sed -i '/^User=/s/nobody/v2ray/;/^User=/aDynamicUser=true' release/config/systemd/system/*.service || die
29 default
32 src_compile() {
33 ego build -o v2ray -trimpath -ldflags "-s -w -buildid=" ./main
36 src_install() {
37 dobin v2ray
39 insinto /etc/v2ray
40 newins release/config/config.json config.json.example
42 newinitd "${FILESDIR}/v2ray.initd-r1" v2ray
43 systemd_dounit release/config/systemd/system/v2ray{,@}.service