add doc and adjust makefile

This commit is contained in:
zhangsz
2025-06-26 11:44:46 +08:00
parent 0f8e406da4
commit b573fd0ca0
6 changed files with 62 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
GO_BIN_PATH = bin
GO_SRC_PATH = src
ROOT_PATH = $(shell pwd)
RElEASE_PATH = $(ROOT_PATH)/release
GO_NF = ac
@@ -32,8 +33,12 @@ $(GO_BIN_PATH)/%: $(GO_FILES)
vpath %.go $(addprefix $(GO_SRC_PATH)/, $(GO_NF))
deb:
PKG_NAME = ac-r$(VERSION)-ub22
deb: $(GO_NF)
@echo "Start building deb package for $(@F)...."
test -d debian && rm -rf debian/* || mkdir debian
test -d $(RElEASE_PATH) || mkdir -p $(RElEASE_PATH)
mkdir -p debian/DEBIAN
mkdir -p debian/usr/local/bin
mkdir -p debian/usr/local/etc/ac/default
@@ -44,8 +49,7 @@ deb:
cp scripts/postinst debian/DEBIAN
cp scripts/prerm debian/DEBIAN
cp scripts/control debian/DEBIAN
fakeroot dpkg-deb --build debian
mv debian.deb debian/ac-r$(VERSION)-ub22.deb
fakeroot dpkg-deb --build debian $(RElEASE_PATH)/$(PKG_NAME).deb
clean:
rm -rf $(addprefix $(GO_BIN_PATH)/, $(GO_NF))