#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
                             -Denable_vala=true \
                             -Dgtk_doc=true \
                             -Dglade_catalog=true

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_auto_test:
	# Ignore test failures since tests require Internet access
	dh_auto_test || true

# Ubuntu's dh_translations can't handle two .pot files yet
# https://launchpad.net/bugs/1751820
override_dh_translations:
	dh_translations --domain=libgweather-3.0
	ninja -C obj-$(DEB_HOST_GNU_TYPE) libgweather-locations-pot

override_dh_auto_clean:
	dh_auto_clean
	rm -f po-locations/libgweather-locations.pot
