Skip to content

Commit

Permalink
net-proxy/mihomo: inherit fcaps
Browse files Browse the repository at this point in the history
Signed-off-by: jinqiang zhang <[email protected]>
  • Loading branch information
peeweep committed Nov 28, 2024
1 parent c38c10e commit 55dc2fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net-proxy/mihomo/mihomo-1.18.10-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module systemd
inherit go-module systemd fcaps

DESCRIPTION="Another Clash Kernel, formerly Clash.Meta"
HOMEPAGE="
Expand Down Expand Up @@ -41,6 +41,10 @@ SLOT="0"
KEYWORDS="~amd64 ~arm64 ~loong"
IUSE="+gvisor systemd +tun"

FILECAPS=(
cap_net_admin,cap_net_bind_service=+ep /usr/bin/mihomo
)

src_compile() {
local BUILDTIME=$(LC_ALL=C date -u || die)
local MY_TAGS
Expand All @@ -60,8 +64,5 @@ src_install() {
dosym -r "/usr/bin/mihomo" "/usr/bin/clash-meta"
systemd_dounit "${FILESDIR}/mihomo.service"
systemd_newunit "${FILESDIR}/mihomo_at.service" [email protected]
if use tun; then
fperms +s /usr/bin/mihomo
fi
newinitd "${FILESDIR}"/mihomo.initd mihomo
}

0 comments on commit 55dc2fb

Please sign in to comment.