#!/usr/bin/make -f

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

%:
	dh $@

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