2013-11-01 21:35:55 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2013-11-08 13:07:20 +01:00
|
|
|
export DH_VERBOSE=1
|
2013-11-01 21:35:55 +01:00
|
|
|
|
|
|
|
%:
|
2013-11-08 13:07:20 +01:00
|
|
|
dh $@
|
2013-11-01 21:35:55 +01:00
|
|
|
|
|
|
|
override_dh_auto_clean:
|
2013-12-11 13:22:00 +01:00
|
|
|
ifeq ($(shell test -d .git && echo "git"),git) # verify we are in a GIT repo
|
2014-06-13 10:20:44 +02:00
|
|
|
# ensure icinga-version.h.force to be present
|
|
|
|
rm -f icinga-version.h.force icinga-version.h.fallback
|
2013-12-04 20:40:10 +01:00
|
|
|
rm -rf debian-prebuild/
|
|
|
|
mkdir debian-prebuild
|
|
|
|
cd debian-prebuild/ && cmake ../debian/
|
2014-06-13 10:20:44 +02:00
|
|
|
cp debian-prebuild/icinga-version.h.force .
|
2013-12-04 20:40:10 +01:00
|
|
|
rm -rf debian-prebuild/
|
2013-12-11 13:22:00 +01:00
|
|
|
endif
|
2013-11-27 14:55:14 +01:00
|
|
|
# now clean build dir
|
2013-11-01 21:35:55 +01:00
|
|
|
dh_auto_clean
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
2013-11-08 13:07:20 +01:00
|
|
|
dh_auto_configure -- \
|
|
|
|
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
|
|
|
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
2014-07-22 13:18:41 +02:00
|
|
|
-DICINGA2_RUNDIR=/run \
|
2013-11-08 13:07:20 +01:00
|
|
|
-DICINGA2_USER=nagios \
|
|
|
|
-DICINGA2_GROUP=nagios \
|
|
|
|
-DICINGA2_COMMAND_USER=nagios \
|
2014-07-16 09:03:51 +02:00
|
|
|
-DICINGA2_COMMAND_GROUP=www-data \
|
2014-07-22 13:22:39 +02:00
|
|
|
-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins
|
2013-11-01 21:35:55 +01:00
|
|
|
|
2013-12-04 19:06:43 +01:00
|
|
|
override_dh_auto_install:
|
|
|
|
dh_auto_install
|
|
|
|
# remove features-enabled - these will be activated by postinst later
|
|
|
|
rm -r debian/tmp/etc/icinga2/features-enabled/*
|
|
|
|
|
2013-11-01 21:35:55 +01:00
|
|
|
override_dh_install:
|
|
|
|
dh_install
|
|
|
|
# remove ido files from other packages
|
2013-11-08 13:07:20 +01:00
|
|
|
if [ -d debian/icinga2-common/ ]; then rm debian/icinga2-common/etc/icinga2/features-available/ido-*; fi
|
|
|
|
rm debian/icinga2-bin/usr/lib/*/icinga2/libdb_ido_*
|
2014-06-16 16:14:31 +02:00
|
|
|
for dbms in mysql pgsql; do \
|
|
|
|
mkdir -p debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/install ; \
|
|
|
|
mkdir -p debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/upgrade/$$dbms; \
|
|
|
|
cp components/db_ido_$$dbms/schema/$$dbms.sql debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/install/$$dbms ; \
|
|
|
|
done
|
|
|
|
# for file in components/db_ido_$$dbms/schema/upgrade/* ; do \
|
|
|
|
# cp $$file debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/upgrade/$$dbms/`basename $$file .sql`; \
|
|
|
|
# done; \
|
|
|
|
#done
|
|
|
|
|
2013-11-01 21:35:55 +01:00
|
|
|
|
|
|
|
override_dh_installinit:
|
|
|
|
dh_installinit --name=icinga2
|
|
|
|
|
2013-12-18 14:21:30 +01:00
|
|
|
.PHONY: override_dh_strip
|
|
|
|
override_dh_strip:
|
|
|
|
dh_strip --dbg-package=icinga2-dbg
|
|
|
|
|
2013-11-01 21:35:55 +01:00
|
|
|
# vi: noexpandtab :
|