From ff595ee679e8125574f49eb39a0f1e17195cb2c0 Mon Sep 17 00:00:00 2001
From: David Sansome <davidsansome@gmail.com>
Date: Sat, 24 Jul 2010 23:04:28 +0000
Subject: [PATCH] Keep the BUILDBOT_REVISION the same when generating a deb
 rules file, so the version number doesn't change on launchpad

---
 debian/CMakeLists.txt      | 2 ++
 debian/{rules => rules.in} | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
 rename debian/{rules => rules.in} (84%)

diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt
index d899a2caf..f02fa8c04 100644
--- a/debian/CMakeLists.txt
+++ b/debian/CMakeLists.txt
@@ -5,3 +5,5 @@ set(DEB_DIST "unstable" CACHE STRING "Distribution to set in the .deb changelog"
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/changelog.in
                ${CMAKE_CURRENT_SOURCE_DIR}/changelog)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rules.in
+               ${CMAKE_CURRENT_SOURCE_DIR}/rules @ONLY)
diff --git a/debian/rules b/debian/rules.in
similarity index 84%
rename from debian/rules
rename to debian/rules.in
index daeae1515..79ffc6087 100755
--- a/debian/rules
+++ b/debian/rules.in
@@ -5,8 +5,9 @@ configure: configure-stamp
 configure-stamp:
 	dh_testdir
 	cd bin && cmake .. \
-    -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/clementine/usr \
-    -DBUNDLE_PROJECTM_PRESETS=OFF
+	  -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/clementine/usr \
+	  -DBUNDLE_PROJECTM_PRESETS=OFF \
+	  -DBUILDBOT_REVISION=@BUILDBOT_REVISION@
 	touch configure-stamp
 
 build: build-stamp