-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jinqiang zhang <[email protected]>
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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=" | ||
|
@@ -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 | ||
|
@@ -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 | ||
} |