-
Notifications
You must be signed in to change notification settings - Fork 577
/
rules
executable file
·60 lines (50 loc) · 1.89 KB
/
rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@
override_dh_auto_clean:
ifeq ($(shell test -d .git && echo "git"),git) # verify we are in a GIT repo
# ensure icinga-version.h.force to be present
rm -f icinga-version.h.force icinga-version.h.fallback
rm -rf debian-prebuild/
mkdir debian-prebuild
cd debian-prebuild/ && cmake ../debian/
cp debian-prebuild/icinga-version.h.force .
rm -rf debian-prebuild/
endif
# now clean build dir
dh_auto_clean
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DICINGA2_RUNDIR=/run \
-DICINGA2_USER=nagios \
-DICINGA2_GROUP=nagios \
-DICINGA2_COMMAND_USER=nagios \
-DICINGA2_COMMAND_GROUP=www-data \
-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins
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/*
override_dh_install:
dh_install
# remove ido files from other packages
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_*
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
override_dh_installinit:
dh_installinit --name=icinga2
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --dbg-package=icinga2-dbg
# vi: noexpandtab :