feat: refactor to ymsctl & yms-daemon

This commit is contained in:
2026-08-17 02:10:10 +08:00
parent 7755da72e7
commit 79f18fcdea
23 changed files with 394 additions and 47 deletions
+3 -2
View File
@@ -71,12 +71,13 @@ sources_dir="$top_dir/SOURCES"
temporary_dir="$build_dir/tmp"
mkdir -p "$sources_dir" "$top_dir/BUILD" "$top_dir/BUILDROOT" "$top_dir/RPMS" "$top_dir/SRPMS" "$temporary_dir"
echo "Building static linux/$go_arch yms-daemon"
echo "Building static linux/$go_arch ymsd and ymsctl"
(
cd "$project_dir"
GOCACHE="$build_dir/go-cache" CGO_ENABLED=0 GOOS=linux GOARCH="$go_arch" \
go build -trimpath -ldflags="-s -w" -o "$sources_dir/yms-daemon" .
go build -trimpath -ldflags="-s -w" -o "$sources_dir/ymsd" .
)
cp "$sources_dir/ymsd" "$sources_dir/ymsctl"
install -m 0640 "$project_dir/packaging/etc/yms-daemon/yms-daemon.toml" "$sources_dir/yms-daemon.toml"
install -m 0644 "$project_dir/packaging/systemd/yms-daemon.service" "$sources_dir/yms-daemon.service"