代码拉取完成,页面将自动刷新
同步操作将从 anolis/keentuned 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
VERSION = 2.3.0
.PHONY: all clean daemon cli
PKGPATH=pkg
CURDIR=$(shell pwd)
PYDIR=$(shell which python3)
PREFIX ?= /usr
CONFDIR ?= /etc
LIBEXEC ?= libexec
BINDIR = $(DESTDIR)$(PREFIX)/bin
SYSCONFDIR = $(DESTDIR)$(CONFDIR)
SYSTEMDDIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
MANDIR ?= $(DESTDIR)/usr/share/man
SRCVERSION = $(shell git rev-parse --short HEAD 2>/dev/null)
ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION)))
SHELL = /bin/bash
GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" -linkmode=external'
all: abs-python daemon cli
abs-python:
@if [ $(PYDIR) ] ; then \
sed -i "s?ExecStart=python3?ExecStart=$(PYDIR)?g" $(CURDIR)/keentuned.service; \
else \
echo "no python3 exists."; \
fi
daemon:
cd daemon && go build -mod=vendor -v $(GOFLAGS) -o ../$(PKGPATH)/keentuned
cli:
cd cli && go build -mod=vendor -v $(GOFLAGS) -o ../$(PKGPATH)/keentune
clean:
rm -rf $(PKGPATH)/*
install:
@echo "BEGIN INSTALL keentuned"
mkdir -p $(BINDIR)
mkdir -p $(SYSCONFDIR)/keentune/keentuned/
mkdir -p $(SYSCONFDIR)/keentune/keentuned/conf/
mkdir -p $(SYSTEMDDIR)
mkdir -p ${MANDIR}/man5/
mkdir -p ${MANDIR}/man7/
mkdir -p ${MANDIR}/man8/
mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/completions/
install -m 0755 $(PKGPATH)/keentune $(BINDIR)
install -m 0755 $(PKGPATH)/keentuned $(BINDIR)
cp -rf daemon/examples/* $(SYSCONFDIR)/keentune/keentuned
cp -rf cli daemon go.mod go.sum $(SYSCONFDIR)/keentune/keentuned
sed -i "0,/\(^LOGFILE_LEVEL\\s*\)=.*/s//\1= INFO/" keentuned.conf
install -m 0644 keentuned.conf $(SYSCONFDIR)/keentune/keentuned/conf/
install -m 0644 keentuned.service $(SYSTEMDDIR)
install -D -m 0644 man/keentune.8 ${MANDIR}/man8/keentune.8
install -D -m 0644 man/keentuned.8 ${MANDIR}/man8/keentuned.8
install -D -m 0644 man/keentuned.conf.5 ${MANDIR}/man5/keentuned.conf.5
install -D -m 0644 man/keentune-benchmark.7 ${MANDIR}/man7/keentune-benchmark.7
install -D -m 0644 man/keentune-profile.7 ${MANDIR}/man7/keentune-profile.7
install -D -m 0644 man/keentune-detect.7 ${MANDIR}/man7/keentune-detect.7
install -D -m 0755 keentune.bash $(DESTDIR)$(PREFIX)/share/bash-completion/completions/
@echo "END INSTALL keentuned"
startup:
systemctl daemon-reload
systemctl restart keentuned
systemctl restart keentuned
run: all install startup
check: run
cd ${CURDIR}/test && python3 main.py
authors:
git shortlog --summary --numbered --email|grep -v openeuler-ci-bot|sed 's/<root@localhost.*//'| awk '{$$1=null;print $$0}'|sed 's/^[ ]*//g' > AUTHORS
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。