]> granicus.if.org Git - icinga2/commitdiff
Debian: Made creation of icinga-version.h.fallback safer.
authorMarkus Frosch <markus@lazyfrosch.de>
Wed, 4 Dec 2013 19:40:10 +0000 (20:40 +0100)
committerMarkus Frosch <markus@lazyfrosch.de>
Wed, 4 Dec 2013 19:40:10 +0000 (20:40 +0100)
We now use a custom CMakeLists.txt to just create this file without checking
dependencies or doing other stuff.

Idea is to avoid breaking on systems that only create source packages for
chroot builds.

Refs #5261

debian/CMakeLists.txt [new file with mode: 0644]
debian/rules

diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e4b88b7
--- /dev/null
@@ -0,0 +1,30 @@
+# Icinga 2
+# Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+#
+# this file is used to build icinga-version.h.fallback
+# for the Debian builds, it needs to be included in the tarball
+#
+
+cmake_minimum_required(VERSION 2.6)
+project(icinga2)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+
+include(GetGitRevisionDescription)
+git_describe(GIT_VERSION --tags)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../icinga-version.h.cmake" icinga-version.h.fallback)
+
index 7740fbe885783947f271705edd4e5a81c3f4e748..c32e8296344e9316a90ff3f46be205d753c99aaf 100755 (executable)
@@ -6,8 +6,12 @@ export DH_VERBOSE=1
        dh $@
 
 override_dh_auto_clean:
-       # configure icinga2 to get icinga-version.h
-       dh_auto_configure
+       # ensure icinga-version.h.fallback to be present
+       rm -rf debian-prebuild/
+       mkdir debian-prebuild
+       cd debian-prebuild/ && cmake ../debian/
+       cp debian-prebuild/icinga-version.h.fallback .
+       rm -rf debian-prebuild/
        # now clean build dir
        dh_auto_clean
        rm -f config.log