From aba01f63c7ae0c53166ce9b07b51c8e66938e47a Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 24 Jul 2010 13:01:46 +0000 Subject: [PATCH] Add a cmake option to specify the .deb distribution --- cmake/Version.cmake | 16 ++++++++-------- debian/CMakeLists.txt | 2 ++ debian/changelog.in | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 29a953237..79cc3a3c6 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -3,21 +3,21 @@ # Version numbers. For m.n rc, use m.(n-1).99 set(CLEMENTINE_VERSION_MAJOR 0) set(CLEMENTINE_VERSION_MINOR 4) +set(CLEMENTINE_VERSION_PATCH 0) set(BUILDBOT_REVISION $ENV{BUILDBOT_REVISION}) if(BUILDBOT_REVISION) - set(CLEMENTINE_VERSION_PATCH 90) set(CLEMENTINE_VERSION_STRING "0.4 - buildbot r${BUILDBOT_REVISION}") # Displayed in GUIs set(CLEMENTINE_VERSION_SHORT_STRING "0.4r${BUILDBOT_REVISION}") # Used in filenames + set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}.90~r${BUILDBOT_REVISION}) else(BUILDBOT_REVISION) - set(CLEMENTINE_VERSION_PATCH 0) set(CLEMENTINE_VERSION_STRING "0.4") set(CLEMENTINE_VERSION_SHORT_STRING "0.4") + + if (CLEMENTINE_VERSION_PATCH) + set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}.${CLEMENTINE_VERSION_PATCH}) + else (CLEMENTINE_VERSION_PATCH) + set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}) + endif (CLEMENTINE_VERSION_PATCH) endif(BUILDBOT_REVISION) - -if (CLEMENTINE_VERSION_PATCH) - set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}.${CLEMENTINE_VERSION_PATCH}) -else (CLEMENTINE_VERSION_PATCH) - set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}) -endif (CLEMENTINE_VERSION_PATCH) diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt index 22edd201d..d899a2caf 100644 --- a/debian/CMakeLists.txt +++ b/debian/CMakeLists.txt @@ -1,5 +1,7 @@ execute_process(COMMAND date "+%a, %-d %b %Y %H:%M:%S %z" OUTPUT_VARIABLE DEB_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) +set(DEB_DIST "unstable" CACHE STRING "Distribution to set in the .deb changelog") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/changelog.in ${CMAKE_CURRENT_SOURCE_DIR}/changelog) diff --git a/debian/changelog.in b/debian/changelog.in index b7713a628..3e1c31bb9 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,4 +1,4 @@ -clementine (${CLEMENTINE_VERSION}) unstable; urgency=low +clementine (${CLEMENTINE_VERSION}) ${DEB_DIST}; urgency=low * Version ${CLEMENTINE_VERSION_STRING}