mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
CMake: add support for RPM packaging with CPack
This commit is contained in:
parent
4ed7c559f1
commit
de656ba1a7
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.6)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
|
|
||||||
project(SoftEtherVPN
|
project(SoftEtherVPN
|
||||||
VERSION 5.01.9657
|
VERSION 5.01.9657
|
||||||
@ -17,7 +17,6 @@ set(BUILD_DIRECTORY ${SoftEtherVPN_SOURCE_DIR}/build)
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
# Packaging
|
# Packaging
|
||||||
set(CPACK_GENERATOR "DEB")
|
|
||||||
set(CPACK_COMPONENTS_ALL vpnserver vpnclient vpnbridge vpncmd)
|
set(CPACK_COMPONENTS_ALL vpnserver vpnclient vpnbridge vpncmd)
|
||||||
set(CPACK_PACKAGE_DIRECTORY ${BUILD_DIRECTORY})
|
set(CPACK_PACKAGE_DIRECTORY ${BUILD_DIRECTORY})
|
||||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||||
@ -33,4 +32,10 @@ set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
|||||||
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
|
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
|
||||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown")
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown")
|
||||||
|
|
||||||
|
# RPM
|
||||||
|
set(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||||
|
set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet")
|
||||||
|
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -35,6 +35,16 @@ if [ -z ${OPENSSL_ROOT_DIR} ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -x "$(command -v rpmbuild)" ]; then
|
||||||
|
echo "'rpmbuild' executable found, CPack will generate RPM packages."
|
||||||
|
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
|
||||||
|
else
|
||||||
|
echo "'rpmbuild' executable not found, CPack will generate DEB packages."
|
||||||
|
CMAKE_FLAGS="-DCPACK_GENERATOR='DEB' ${CMAKE_FLAGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
(cd tmp && cmake ${CMAKE_FLAGS} .. || exit 1)
|
(cd tmp && cmake ${CMAKE_FLAGS} .. || exit 1)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user