Cmake build: Needed variable for creation of debian package

The variable CPACK_DEBIAN_PACKAGE_RELEASE has to be in the form
of "^[A-Za-z0-9.+~]+$". We will use the abbreviated commit revision for now.
Without this change cmake 3.10 emits error.
This commit is contained in:
Kornel Benko 2017-10-07 10:47:17 +02:00
parent 0bf3136837
commit 847c68960a
2 changed files with 5 additions and 2 deletions

View File

@ -354,12 +354,14 @@ endforeach(_c_l)
FIND_PROGRAM(LYX_GITVERSION git)
#message(STATUS "gitversion = ${LYX_GITVERSION}")
set(LYX_REVISION_VERSION ${LYX_PATCH_VERSION})
set(LYX_PACKAGE_RELEASE "1")
if(LYX_GITVERSION)
if (LYX_LOCALVERSIONING)
# Find the revision number and for later use
EXECUTE_PROCESS(COMMAND ${LYX_GITVERSION} describe --match 2.0.0 HEAD
WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE LYX_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
if (LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-.*$")
WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE tmp_LYX_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
if (tmp_LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-\(.*\)$")
set(LYX_PACKAGE_RELEASE ${CMAKE_MATCH_2})
# We will add offset of 40000 to get appropriate value to
# previous svn.
# We use this value than also to set the package-patch-value

View File

@ -128,6 +128,7 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME "${LYX_PROJECT}-${LYX_INSTALL_SUFFIX}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.6)")
# use dpkg-shlibdeps to generate additional info for package dependency list.
set(CPACK_DEBIAN_PACKAGE_RELEASE ${LYX_PACKAGE_RELEASE})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DEBUG ON)