Fix building on macOS #1

Merged
Francesco Siddi merged 1 commits from Sergey/svn-manager:fix_macos_compile into main 2023-05-13 18:12:07 +02:00

View File

@ -6,6 +6,11 @@ STATIC_OUT := ${OUT}-${VERSION}
PACKAGE_PATH := dist/${OUT}-${VERSION} PACKAGE_PATH := dist/${OUT}-${VERSION}
BUILDOPTS := BUILDOPTS :=
SHA256_CMD = sha256sum
ifeq (, $(shell which $(SHA256_CMD)))
SHA256_CMD = shasum -a 256
endif
server: server:
go build -v -o ${OUT} -ldflags="-X main.applicationVersion=${VERSION}" ${BUILDOPTS} ${PKG} go build -v -o ${OUT} -ldflags="-X main.applicationVersion=${VERSION}" ${BUILDOPTS} ${PKG}
@ -84,12 +89,12 @@ _prepare_package:
rm -rf ${PACKAGE_PATH} rm -rf ${PACKAGE_PATH}
mkdir -p ${PACKAGE_PATH} mkdir -p ${PACKAGE_PATH}
rsync ui json_schemas ${PACKAGE_PATH}/ -a --delete-after rsync ui json_schemas ${PACKAGE_PATH}/ -a --delete-after
cp -ua README.md LICENSE.txt ${PACKAGE_PATH}/ rsync -ua README.md LICENSE.txt ${PACKAGE_PATH}/
_finish_package: _finish_package:
rm -r ${PACKAGE_PATH} rm -r ${PACKAGE_PATH}
rm -f ${PACKAGE_PATH}.sha256 rm -f ${PACKAGE_PATH}.sha256
sha256sum ${PACKAGE_PATH}* | tee ${PACKAGE_PATH}.sha256 $(SHA256_CMD) ${PACKAGE_PATH}* | tee ${PACKAGE_PATH}.sha256
_package_tar: static _package_tar: static
tar -C $(dir ${PACKAGE_PATH}) -zcf $(PWD)/${PACKAGE_PATH}-${GOOS}.tar.gz $(notdir ${PACKAGE_PATH}) tar -C $(dir ${PACKAGE_PATH}) -zcf $(PWD)/${PACKAGE_PATH}-${GOOS}.tar.gz $(notdir ${PACKAGE_PATH})