From dc25e1efe795cbdcd40694cd59dd36b8507dd908 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 25 Jul 2010 10:05:17 +0000 Subject: [PATCH] Another attempt to get the deb to build on launchpad --- debian/CMakeLists.txt | 16 ++++++++++------ debian/rules.in | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt index 2ae2226ac..3e4d24967 100644 --- a/debian/CMakeLists.txt +++ b/debian/CMakeLists.txt @@ -4,13 +4,17 @@ 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") +set(DEB_REWRITE_RULES ON CACHE BOOL "Rewrite the debian rules file from rules.in") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/changelog.in ${CMAKE_CURRENT_SOURCE_DIR}/changelog) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rules.in - ${CMAKE_CURRENT_BINARY_DIR}/rules @ONLY) -file(COPY ${CMAKE_CURRENT_BINARY_DIR}/rules - DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/ - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ) +if(DEB_REWRITE_RULES) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rules.in + ${CMAKE_CURRENT_BINARY_DIR}/rules @ONLY) + file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/rules) + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/rules + DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/ + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ) +endif(DEB_REWRITE_RULES) diff --git a/debian/rules.in b/debian/rules.in index 79ffc6087..b5cd59ed6 100755 --- a/debian/rules.in +++ b/debian/rules.in @@ -7,7 +7,9 @@ configure-stamp: cd bin && cmake .. \ -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/clementine/usr \ -DBUNDLE_PROJECTM_PRESETS=OFF \ - -DBUILDBOT_REVISION=@BUILDBOT_REVISION@ + -DBUILDBOT_REVISION=@BUILDBOT_REVISION@ \ + -DDEB_DIST=@DEB_DIST@ \ + -DDEB_REWRITE_RULES=OFF touch configure-stamp build: build-stamp