From 98496dc0c396c4b5da0f3b833f654bea729542e7 Mon Sep 17 00:00:00 2001 From: ysicing Date: Mon, 26 Aug 2024 17:36:50 +0800 Subject: [PATCH] * [fix#53361] fix linux package build --- Makefile | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 266fbcd4..f3abc767 100644 --- a/Makefile +++ b/Makefile @@ -216,15 +216,25 @@ zip_server_win64: zip_server_linux: @mkdir -p ${QINIU_DIST_DIR}linux - @cd ${COMMAND_BIN_DIR}linux && zip -ry ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip ./demo ./${PROJECT}-server && cd ../.. - @md5sum ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip | awk '{print $$1}' | \ - xargs echo > ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip.md5 + @cd ${COMMAND_BIN_DIR}linux && \ + zip -ry ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip ./demo ./${PROJECT}-server && \ + unzip -o ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip -d ${QINIU_DIST_DIR}linux/ztf-server && \ + zip -ry ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip ${QINIU_DIST_DIR}linux/ztf-server && \ + rm -rf ${QINIU_DIST_DIR}linux/ztf-server && \ + md5sum ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip | awk '{print $$1}' | \ + xargs echo > ${QINIU_DIST_DIR}linux/${PROJECT}-server.zip.md5 && \ + cd ../..; \ zip_server_linux_arm64: @mkdir -p ${QINIU_DIST_DIR}linux_arm64 - @cd ${COMMAND_BIN_DIR}linux_arm64 && zip -ry ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip ./demo ./${PROJECT}-server && cd ../.. - @md5sum ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip | awk '{print $$1}' | \ - xargs echo > ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip.md5 + @cd ${COMMAND_BIN_DIR}linux_arm64 && \ + zip -ry ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip ./demo ./${PROJECT}-server && \ + unzip -o ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip -d ${QINIU_DIST_DIR}linux_arm64/ztf-server && \ + zip -ry ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip ${QINIU_DIST_DIR}linux_arm64/ztf-server && \ + rm -rf ${QINIU_DIST_DIR}linux_arm64/ztf-server && \ + md5sum ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip | awk '{print $$1}' | \ + xargs echo > ${QINIU_DIST_DIR}linux_arm64/${PROJECT}-server.zip.md5 && \ + cd ../..; \ zip_server_mac: @mkdir -p ${QINIU_DIST_DIR}darwin @@ -249,6 +259,9 @@ zip_client_linux: @mkdir -p ${QINIU_DIST_DIR}linux && rm -rf ${QINIU_DIST_DIR}linux/${PROJECT}.zip @cd ${CLIENT_OUT_DIR}linux && \ zip -ry ${QINIU_DIST_DIR}linux/${PROJECT}.zip ./* && \ + unzip -o ${QINIU_DIST_DIR}linux/${PROJECT}.zip -d ${QINIU_DIST_DIR}linux/ztf && \ + zip -ry ${QINIU_DIST_DIR}linux/${PROJECT}.zip ${QINIU_DIST_DIR}linux/ztf && \ + rm -rf ${QINIU_DIST_DIR}linux/ztf && \ md5sum ${QINIU_DIST_DIR}linux/${PROJECT}.zip | awk '{print $$1}' | \ xargs echo > ${QINIU_DIST_DIR}linux/${PROJECT}.zip.md5 && \ cd ../..; \ @@ -259,6 +272,9 @@ zip_client_linux_arm64: @mkdir -p ${QINIU_DIST_DIR}linux_arm64 && rm -rf ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip @cd ${CLIENT_OUT_DIR}linux_arm64 && \ zip -ry ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip ./* && \ + unzip -o ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip -d ${QINIU_DIST_DIR}linux_arm64/ztf && \ + zip -ry ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip ${QINIU_DIST_DIR}linux/ztf && \ + rm -rf ${QINIU_DIST_DIR}linux_arm64/ztf && \ md5sum ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip | awk '{print $$1}' | \ xargs echo > ${QINIU_DIST_DIR}linux_arm64/${PROJECT}.zip.md5 && \ cd ../..; \