#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS="hardening=+all"

%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	glib-gettextize --copy --force
	intltoolize --copy --force --automake
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-unique \
		--with-gtk3 \
		--disable-scrollkeeper

override_dh_auto_install:
	dh_auto_install
	# Fix up the wrongly installed icon.
	mkdir -p "$(CURDIR)/debian/gobby/usr/share/gobby-0.5/icons/hicolor/64x64/actions"
	mv "$(CURDIR)/debian/gobby/usr/share/gobby-0.5/icons/hicolor/48x48/actions/chat.png" \
		"$(CURDIR)/debian/gobby/usr/share/gobby-0.5/icons/hicolor/64x64/actions"

override_dh_strip:
	dh_strip -a

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f gnome-doc-utils.make po/Makefile.in.in config.log config.status
	rm -f help/Makefile help/gobby-C.omf po/missing
	rm -f po/*.gmo
	rm -f Makefile
