The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit f4562605622313c56f15706b2c91f0767d5edb57
Author: Kornel Benko <[email protected]>
Date:   Tue Dec 18 10:49:21 2012 +0100

    Cmake build:
    New target: git-archive. It uses the archive comman of git to create
    the complete source package.
    This Target is only available if
            1.) there is a git command on this host
            2.) the lyx-source is under git control

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4616ba8..c53bc59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,6 +277,7 @@ if (LYX_LOCALVERSIONING)
                  # We use this value than also to set the package-patch-value
                  MATH(EXPR tmp_REVISION_VERSION "(${CMAKE_MATCH_1}+40000)")
                  set(LYX_REVISION_VERSION 
"${LYX_PATCH_VERSION}-${tmp_REVISION_VERSION}git")
+                  set(ENABLE_DIST ON)
                endif()
        else()
                set(LYX_REVISION_VERSION git) #TODO use date
@@ -756,4 +757,21 @@ endif()
 
 include("${TOP_CMAKE_PATH}/LyxPackaging.cmake")
 
+if(ENABLE_DIST)
+  # Use git to create the source package
+  # git archive --format=tgz --output=/home/kornel/x.tar.gz master
+  if(UNIX)
+    set(DIST_FORMAT tgz)
+  else()
+    set(DIST_FORMAT zip)
+  endif()
+  set(DIST_NAME 
${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CMAKE_SYSTEM_NAME}.${DIST_FORMAT})
+
+  add_custom_command(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${DIST_NAME}
+    COMMAND  ${LYX_GITVERSION} archive --format=${DIST_FORMAT} 
--output=${CMAKE_CURRENT_BINARY_DIR}/${DIST_NAME} master
+    WORKING_DIRECTORY ${TOP_SRC_DIR})
+  add_custom_target(git-archive DEPENDS 
${CMAKE_CURRENT_BINARY_DIR}/${DIST_NAME})
+endif()
+
 message(STATUS)

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to