#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

options= V=1 HAVE_SNMP=1 SYSTEMDSYSTEMUNITDIR=/lib/systemd/system

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

override_dh_install:
	# no dracut
	rm debian/tmp/lib/s390-tools/zdev-root-update
	cp etc/sysconfig/cpuplugd debian/tmp/etc/cpuplugd.conf
	chmod -x debian/tmp/etc/*/*.conf debian/tmp/lib/s390-tools/zfcpdump/zfcpdump_part.rd
	dh_install -ps390-tools-cpuplugd
	dh_install -ps390-tools-statd
	dh_install -ps390-tools-osasnmpd
	dh_install -Xcpuplugd -Xosasnmpd -Xprocd -Xfsstatd --fail-missing

override_dh_auto_clean:
	dh_auto_clean -- $(options)

override_dh_auto_build:
	dh_auto_build -- $(options)

override_dh_auto_install:
	dh_auto_install -- $(options)
