File: rules

package info (click to toggle)
icinga2 2.10.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,940 kB
  • sloc: cpp: 67,856; sql: 3,202; ansic: 2,931; cs: 1,650; yacc: 1,594; sh: 1,124; lex: 450; python: 410; tcl: 86; makefile: 70
file content (100 lines) | stat: -rwxr-xr-x 3,149 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/make -f

#export DH_VERBOSE=1

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

# disable unity builds for arches with low memory
ifneq (,$(findstring $(DEB_BUILD_ARCH),"armhf mips mipsel"))
	UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off
endif

%:
	dh $@ --with systemd --with bash_completion --parallel

override_dh_auto_clean:
	dh_auto_clean

	test ! -f third-party/cmake/GNUInstallDirs.cmake.disabled || \
		mv third-party/cmake/GNUInstallDirs.cmake.disabled third-party/cmake/GNUInstallDirs.cmake

override_dh_auto_configure:
	test -f third-party/cmake/GNUInstallDirs.cmake.disabled || \
		mv third-party/cmake/GNUInstallDirs.cmake third-party/cmake/GNUInstallDirs.cmake.disabled

	dh_auto_configure \
		-- \
		-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DICINGA2_RUNDIR=/run \
		-DICINGA2_USER=nagios \
		-DICINGA2_GROUP=nagios \
		-DICINGA2_COMMAND_GROUP=www-data \
		-DICINGA2_GIT_VERSION_INFO=false \
		-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \
		-DUSE_SYSTEMD=ON \
		$(UNITY_BUILD)

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-arch:
	dh_install -a

	$(RM) debian/libicinga2/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 lib/db_ido_$$dbms/schema/$$dbms.sql debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/install/$$dbms ; \
		for file in lib/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_install-indep:
	dh_install -i

	chmod +x debian/icinga2-common/usr/lib/icinga2/prepare-dirs

	$(RM) debian/icinga2-common/etc/icinga2/features-available/ido-*

override_dh_installinit:
	dh_installinit --name=icinga2

override_dh_systemd_enable:
	dh_systemd_enable --name=icinga2

override_dh_compress:
	dh_compress
	dh_compress -p icinga2-doc usr/share/doc/icinga2/markdown/01-about.md

override_dh_missing:
	# Explicitly remove files not included in any package
	$(RM) debian/tmp/etc/bash_completion.d/icinga2
	$(RM) debian/tmp/etc/init.d/icinga2
	$(RM) debian/tmp/usr/lib/*/icinga2/lib*.so
	$(RM) debian/tmp/usr/lib/systemd/system/icinga2.service
	$(RM) debian/tmp/usr/share/doc/icinga2/AUTHORS
	$(RM) debian/tmp/usr/share/doc/icinga2/CHANGELOG.md
	$(RM) debian/tmp/usr/share/doc/icinga2/COPYING
	$(RM) debian/tmp/usr/share/doc/icinga2/COPYING.Exceptions
	$(RM) debian/tmp/usr/share/doc/icinga2/NEWS
	$(RM) debian/tmp/usr/share/doc/icinga2/README.md

	dh_missing --list-missing

override_dh_strip:
	dh_strip --dbgsym-migration='icinga2-dbg (<< 2.8.4)'

# we don't build shared libraries
override_dh_makeshlibs:
	dh_makeshlibs --no-scripts

# vi: noexpandtab ts=4 sw=4 :