2010-07-25 01:55:51 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2012-01-03 12:53:34 +01:00
|
|
|
execute_process(COMMAND env LC_ALL=C date "+%a, %-d %b %Y %H:%M:%S %z"
|
2010-06-25 00:07:04 +02:00
|
|
|
OUTPUT_VARIABLE DEB_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
2010-07-25 12:05:17 +02:00
|
|
|
set(DEB_REWRITE_RULES ON CACHE BOOL "Rewrite the debian rules file from rules.in")
|
2010-07-24 15:01:46 +02:00
|
|
|
|
2010-06-25 00:07:04 +02:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/changelog.in
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/changelog)
|
2010-07-25 01:55:51 +02:00
|
|
|
|
2010-07-25 12:05:17 +02:00
|
|
|
if(DEB_REWRITE_RULES)
|
|
|
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rules.in
|
2010-07-30 10:13:35 +02:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/rules.tmp/rules @ONLY)
|
2010-07-25 12:05:17 +02:00
|
|
|
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/rules)
|
2010-07-30 10:13:35 +02:00
|
|
|
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/rules.tmp/rules
|
2010-07-25 12:05:17 +02:00
|
|
|
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/
|
|
|
|
FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
|
|
|
|
GROUP_EXECUTE GROUP_READ)
|
|
|
|
endif(DEB_REWRITE_RULES)
|