#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

export AUTOPOINT = true

ifeq ($(DEB_HOST_ARCH_OS),linux)
	ENABLE_SYSTEMD := --enable-systemd
endif

%:
	dh $@ --with gnome

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- $(ENABLE_SYSTEMD)

override_dh_auto_build:
	dh_auto_build
	docbook-to-man debian/gnome-system-monitor.sgml \
		> debian/gnome-system-monitor.1

override_dh_auto_clean:
	-rm -f debian/gnome-system-monitor.1
	-rm -f intltool-extract intltool-merge intltool-update
	-rm -f po/.intltool-merge-cache
