#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_CFLAGS_MAINT_APPEND = -I/usr/include/tirpc/
export DEB_LDFLAGS_MAINT_APPEND = -ltirpc
export DH_VERBOSE = 1
%:
	dh $@


override_dh_auto_configure:
	dh_auto_configure -- \
		--sysconfdir=/etc/ganglia \
		--with-gmetad

override_dh_auto_install: debian/gmond.conf debian/libganglia1-dev.links
	dh_auto_install
	find debian/ -name "*.la" -delete

debian/gmond.conf: debian/gmond.conf.in
	sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' $< > $@

debian/libganglia1-dev.links: debian/libganglia1-dev.links.in
	sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' $< > $@

override_dh_missing:
