#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CPPFLAGS_MAINT_APPEND=-D_GNU_SOURCE
export DEB_LDFLAGS_MAINT_APPEND=-rdynamic
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 -f debian/tmp/lib/s390-tools/zdev-root-update
	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 -X60-readahead.rules

override_dh_auto_clean:
	dh_auto_clean -- $(options)

override_dh_auto_build:
	dh_auto_build -- $(options)

override_dh_auto_install:
	dh_auto_install -- $(options)
