#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)


%:
	dh ${@}


override_dh_auto_configure:
	dh_auto_configure -- \
			--disable-silent-rules \
			--enable-opaque-hierarchy="name=systemd"


override_dh_auto_test:
	# Disabled. Requires root and also modifies the testbed.


override_dh_auto_install:
	dh_auto_install

	# Remove unwanted/unused files (because of --fail-missing)
	cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) && \
		rm -f *.la security/*.la security/*.a \
		libcgroupfortesting.so.* \
		libcgset.so.*

override_dh_missing:
	dh_missing --fail-missing


override_dh_compress:
	dh_compress -Xexamples


override_dh_makeshlibs:
	dh_makeshlibs -Xpam_cgroup.so
