summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..76c0336
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+
+#include /usr/share/quilt/quilt.make
+
+#export DH_VERBOSE=1
+export DH_OPTIONS
+
+#
+# Hardening
+#
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Platform-specific features
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+ifneq ($(DEB_HOST_ARCH_OS),linux)
+ # USB implementation is Linux-specific
+ extra_config_opts += --disable-intf-usb
+endif
+
+
+%:
+ dh $@ --with systemd,autoreconf
+
+override_dh_autoreconf:
+ touch NEWS
+ dh_autoreconf
+ $(RM) NEWS
+
+override_dh_auto_install:
+ dh_auto_install
+ # No need to have two copies of the license text/changelog in the package.
+ $(RM) $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/COPYING
+ $(RM) $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/ChangeLog
+
+override_dh_installinit:
+ dh_installinit --name ipmievd --error-handler=ipmievd_initd_failed
+
+override_dh_systemd_enable:
+ dh_systemd_enable --no-enable ipmievd.service
+
+override_dh_auto_configure:
+ dh_auto_configure -- --prefix=/usr --with-kerneldir --mandir=/usr/share/man $(extra_config_opts)