mirror of https://github.com/Icinga/icinga2.git
Debian: Made creation of icinga-version.h.fallback safer.
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
This commit is contained in:
parent
2b7e8ed7ab
commit
751f3ad19b
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue