1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-09-19 18:01:25 +03:00

configure: select TGZ rather than DEB for CPack on macOS

configure picks the CPack generator by probing for an rpm executable: if
present it selects RPM, otherwise it falls through to DEB. macOS has neither,
so it selects DEB, which is not a meaningful package format there.

Add a Darwin branch selecting TGZ, which always works. An explicit
CPACK_GENERATOR in the environment still takes precedence, so anyone wanting
productbuild or DragNDrop can ask for it.

This only affects 'make package'; ordinary builds never read CPACK_GENERATOR,
which is why macOS CI is unaffected.
This commit is contained in:
Meylis Annagurbanov
2026-08-29 11:06:04 +05:00
parent 84069c1238
commit 26270939d5
Vendored
+3
View File
@@ -40,6 +40,9 @@ fi
if [ ! -z ${CPACK_GENERATOR+x} ]; then if [ ! -z ${CPACK_GENERATOR+x} ]; then
echo "CPACK_GENERATOR is set, CPack will generate ${CPACK_GENERATOR} packages." echo "CPACK_GENERATOR is set, CPack will generate ${CPACK_GENERATOR} packages."
CMAKE_FLAGS="-DCPACK_GENERATOR=${CPACK_GENERATOR} ${CMAKE_FLAGS}" CMAKE_FLAGS="-DCPACK_GENERATOR=${CPACK_GENERATOR} ${CMAKE_FLAGS}"
elif [ "$(uname -s)" = "Darwin" ]; then
echo "Darwin detected, CPack will generate TGZ archives."
CMAKE_FLAGS="-DCPACK_GENERATOR='TGZ' ${CMAKE_FLAGS}"
elif [ -x "$(command -v rpm)" ]; then elif [ -x "$(command -v rpm)" ]; then
echo "'rpm' executable found, CPack will generate RPM packages." echo "'rpm' executable found, CPack will generate RPM packages."
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}" CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"