summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:32:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:32:39 +0000
commitb86b946791f8dcc23ed6c47d513e34ebb22c1610 (patch)
tree9893d33a249fbf175f69e9f18a7fa0b84718ec24 /debian/rules
parentAdding upstream version 2.14.2. (diff)
downloadicinga2-b86b946791f8dcc23ed6c47d513e34ebb22c1610.tar.xz
icinga2-b86b946791f8dcc23ed6c47d513e34ebb22c1610.zip
Adding debian version 2.14.2-1.debian/2.14.2-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/rules107
1 files changed, 107 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..a52a8e4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,107 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+# Enable hardening build flags
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+include /usr/share/dpkg/architecture.mk
+
+export CTEST_OUTPUT_ON_FAILURE=1
+
+ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
+ export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+endif
+
+%:
+ dh $@
+
+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
+
+override_dh_auto_test:
+ifneq (,$(filter $(DEB_BUILD_ARCH),i386 mips64el ppc64el powerpc))
+ dh_auto_test || echo "Ignoring test failures"
+else
+ dh_auto_test
+endif
+
+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_installsystemd:
+ dh_installsystemd --name=icinga2
+
+override_dh_vim-addon:
+ dh_vim-addon -p vim-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
+
+# we don't build shared libraries
+override_dh_makeshlibs:
+ dh_makeshlibs --no-scripts
+
+# vi: noexpandtab ts=4 sw=4 :