#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CONFIGURE_FLAGS = ICU_CFLAGS="$(shell pkg-config --cflags icu-i18n)" \
		  ICU_LIBS="$(shell pkg-config --libs icu-i18n)"

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_install:
	dh_auto_install
	find debian/prelude-lml/usr/lib -name '*.la' -delete

override_dh_install:
	dh_install
	rmdir -v $(CURDIR)/debian/prelude-lml/var/run/prelude-lml
	mkdir -pv $(CURDIR)/debian/prelude-lml/var/spool/prelude/prelude-lml

%:
	dh $@
