1 # Copyright 2023-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic git-r3 go-module systemd
8 DESCRIPTION
="A Modern Dashboard For dae"
9 HOMEPAGE
="https://github.com/daeuniverse/daed"
10 EGIT_REPO_URI
="https://github.com/daeuniverse/daed.git"
16 app-alternatives/v2ray-geoip
17 app-alternatives/v2ray-geosite
21 webui? ( sys-apps/pnpm )
35 ego mod download
-modcacherw
37 ego mod download
-modcacherw
41 # Prevent conflicting with the user's flags
42 # https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed
43 sed -i -e 's/-Werror//' wing
/dae-core
/Makefile || die
'Failed to remove -Werror via sed'
53 # for dae's ebpf target
55 filter-flags
"-march=*" "-mtune=*"
56 append-cflags
"-fno-stack-protector"
58 GO_ROOT
="${S}" emake APPNAME="${PN}" VERSION="${PV}"
62 local service
=install
/daed.service
65 systemd_dounit
$service
68 sed -i "s!/usr/bin/daed!/usr/bin/dae-wing!" $service || die
69 systemd_newunit
$service dae-wing.service
72 dosym
-r "/usr/share/v2ray/geosite.dat" /usr
/share
/daed
/geosite.dat
73 dosym
-r "/usr/share/v2ray/geoip.dat" /usr
/share
/daed
/geoip.dat
75 # thanks to @MarksonHon
76 newinitd
"${FILESDIR}"/${PN}.initd daed
81 elog
"For OpenRC user, if you want to use"
82 elog
"openrc to manager daed service,"
83 elog
"please refer to dae document to modify"
84 elog
"rc.conf and sysfs first, then reboot."
85 elog
"https://github.com/daeuniverse/dae/blob/main/docs/en/tutorials/run-on-alpine.md"
86 elog
"Now you can start and add it to default runlevel "
87 elog
"# rc-service daed start"
88 elog
"# rc-update add daed default"