#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_install:
	find . -type f -not \( \
		-path '*/debian/*' -or \
		-path '*/contrib/*' -or \
		-path '*/.pc/*' -or \
		-name 'version' -or \
		-name 'COPYING' -or \
		-name 'INSTALL' -or \
		-name 'README' -or \
		-name 'getpot' -or \
		-name 'make_release.sh' -or \
		-name 'config_example.php' \
		\) -exec install -D --mode=644 {} $(TMP)/usr/share/squirrelmail/plugins/squirrel_logger/{} \;
	install -D --mode=644 config_example.php $(TMP)/etc/squirrelmail/logger-config.php
	dh_install
