aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-23 10:33:35 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:09:58 -0300
commitb721351c714cbfa71467bc56b53f2912b56c0646 (patch)
tree1fc6192a9b4cd1af8c8f9a389baae25276fac8e0 /CMakeLists.txt
parent84ee7678b9e251305951f0284638e0fd7240aceb (diff)
Changed routine to build source packages.
Our changelog is just the output of git log, so it's added only on source packages and don't need to stay in the git repository. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd0823d8..c2cdbd61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,9 +92,13 @@ add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/c
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${apiextractor_VERSION})
add_custom_target(dist
- COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
- | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
+ git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
+ git archive --prefix=${ARCHIVE_NAME}/ HEAD --format=tar -o "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
+ tar -C "${CMAKE_BINARY_DIR}" --owner=root --group=root -r "${ARCHIVE_NAME}/ChangeLog" -f "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
+ bzip2 -f9 "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar" &&
+ echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
set(root_HEADERS
apiextractormacros.h