aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-23 11:11:28 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-23 11:11:28 -0300
commit81c7eb43c6d6990768348de63dbc9a6da5dbd976 (patch)
tree6f4a824441c48fab99d67cfc8e944a453626ba09 /CMakeLists.txt
parent7f74f2f556677ce0685b92ac02570cbdbadb5f43 (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 5a35ddcb..969b6459 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,9 +64,13 @@ add_custom_target(uninstall "${CMAKE_COMMAND}"
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${generator_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})
install(TARGETS genrunner LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"