重构为 musl 纯静态打包,配置迁 /etc,对齐三项目
Build and Release / release (push) Has been skipped
Build and Release / build-and-test (amd64) (push) Failing after 3m8s
Build and Release / build-and-test (arm64) (push) Failing after 7m31s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 14:55:12 +08:00
co-authored by Claude Opus 4.8
parent b222b802bf
commit 3b024fdc10
14 changed files with 307 additions and 312 deletions
+6 -2
View File
@@ -4,7 +4,7 @@ set -e
# 参数检查
if [ $# -ne 3 ]; then
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
echo "Example: $0 amd64 v4.15.1 p2pool-amd64-ubuntu-v4.15.1.tar.gz"
echo "Example: $0 amd64 4.15.1 p2pool-amd64-linux-static-4.15.1.tar.gz"
exit 1
fi
@@ -45,12 +45,15 @@ PKG_DIR="${BUILD_DIR}/${PKG_NAME}_${DEB_VERSION}_${DEB_ARCH}"
mkdir -p "${PKG_DIR}/DEBIAN"
mkdir -p "${PKG_DIR}/opt/p2pool"
mkdir -p "${PKG_DIR}/lib/systemd/system"
mkdir -p "${PKG_DIR}/etc/p2pool"
# 解压二进制文件
echo "📂 Extracting binaries..."
tar -xzf "${TARGZ_FILE}" -C "${PKG_DIR}/opt/p2pool"
# 打入默认配置(conf/params.conf.example 为唯一配置源,postinst 据此生成 /etc/p2pool/params.conf
echo "📄 Bundling default config..."
cp conf/params.conf.example "${PKG_DIR}/opt/p2pool/params.conf"
# 生成 control 文件
echo "📝 Generating control file..."
sed -e "s/{{VERSION}}/${DEB_VERSION}/" \
@@ -72,6 +75,7 @@ cp debian/p2pool.service "${PKG_DIR}/lib/systemd/system/"
# 设置权限
chmod 755 "${PKG_DIR}/opt/p2pool/p2pool"
chmod 644 "${PKG_DIR}/opt/p2pool/params.conf"
chmod 644 "${PKG_DIR}/lib/systemd/system/p2pool.service"
# 构建 deb 包