1 # Copyright 2021-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="A platform for building proxies to bypass network restrictions"
10 https://github.com/v2fly/v2ray-core
13 amd64? ( https://github.com/v2fly/v2ray-core/releases/download/v${PV}/v2ray-linux-64.zip -> v2ray-${PV}-linux-64.zip )
14 x86? ( https://github.com/v2fly/v2ray-core/releases/download/v${PV}/v2ray-linux-32.zip -> v2ray-${PV}-linux-32.zip )
16 https://github.com/v2fly/v2ray-core/releases/download/v${PV}/v2ray-linux-arm32-v7a.zip -> v2ray-${PV}-linux-arm.zip
19 https://github.com/v2fly/v2ray-core/releases/download/v${PV}/v2ray-linux-arm64-v8a.zip -> v2ray-${PV}-linux-arm64.zip
27 KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86"
30 app-alternatives/v2ray-geoip
31 app-alternatives/v2ray-geosite
37 BDEPEND="app-arch/unzip"
48 sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' systemd/system/*.service || die
49 sed -i '/^User=/s/nobody/v2ray/;/^User=/aDynamicUser=true' systemd/system/*.service || die
51 newinitd "${FILESDIR}/v2ray.initd-r1" v2ray
52 systemd_dounit systemd/system/v2ray.service
53 systemd_dounit systemd/system/v2ray@.service