Use release version for Debian
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 4 Jan 2021 13:15:00 +0000 (14:15 +0100)
committerSandro Knauß <hefee@debian.org>
Thu, 29 Jun 2023 21:07:35 +0000 (23:07 +0200)
Drop upstream git information from version output.

Forwarded: not-needed

Gbp-Pq: Name 0003-Use-release-version-for-Debian.patch

CMakeLists.txt
VERSION.cmake

index ba0195b57efd5c6733d84571878b8383b15e3ac1..9a01673658e82d382b4d0d72c04c8cfa0df16acc 100644 (file)
@@ -95,29 +95,12 @@ include(GNUInstallDirs)
 include(DefineInstallationPaths)
 include(GenerateExportHeader)
 
-include(GetGitRevisionDescription)
-
-get_git_head_revision(GIT_REFSPEC GIT_SHA1)
-
 add_definitions(
     -DQT_DISABLE_DEPRECATED_BEFORE=0x000000
     -DQT_USE_QSTRINGBUILDER
     -DQT_MESSAGELOGCONTEXT #enable function name and line number in debug output
 )
 
-# if we cannot get it from git, directly try .tag (packages)
-# this will work if the tar balls have been properly created
-# via git-archive.
-if ("${GIT_SHA1}" STREQUAL "GITDIR-NOTFOUND")
-    file(READ ${CMAKE_SOURCE_DIR}/.tag sha1_candidate)
-    string(REPLACE "\n" "" sha1_candidate ${sha1_candidate})
-    if (NOT ${sha1_candidate} STREQUAL "$Format:%H$")
-        message("${sha1_candidate}")
-        set (GIT_SHA1 "${sha1_candidate}")
-    endif()
-endif()
-message(STATUS "GIT_SHA1 ${GIT_SHA1}")
-
 set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
 set(SHAREDIR ${CMAKE_INSTALL_FULL_DATADIR})
 
index 5e8ac49db95a6689a034f6e526993752d5f279bd..d713b5c834ad918c39e16730e98100ce51f41fcb 100644 (file)
@@ -33,3 +33,8 @@ set( MIRALL_VERSION_STRING "${MIRALL_VERSION}${MIRALL_VERSION_SUFFIX}" )
 if( MIRALL_VERSION_BUILD )
     set( MIRALL_VERSION_STRING "${MIRALL_VERSION_STRING} (build ${MIRALL_VERSION_BUILD})" )
 endif( MIRALL_VERSION_BUILD )
+
+# Version from Debian changelog
+if( EXTERNAL_VERSION )
+    set( MIRALL_VERSION_STRING "${EXTERNAL_VERSION}" )
+endif( EXTERNAL_VERSION )