#!/usr/bin/make -f

HORDENAME=webmail
DESTDIR=$(CURDIR)/debian/php-horde-$(HORDENAME)

%:
	dh $@ --buildsystem=phppear --with phppear

binary: build
	dh binary --buildsystem=phppear --with phppear --until dh_install
	dh_installdirs etc/horde
	# config of "horde" app:
	mv $(DESTDIR)/usr/share/horde/config $(DESTDIR)/etc/horde/horde
	dh_link etc/horde/horde usr/share/horde/config
	# config of "gollem" app:
	mv $(DESTDIR)/usr/share/horde/gollem/config $(DESTDIR)/etc/horde/gollem
	dh_link etc/horde/gollem usr/share/horde/gollem/config
	# config of "imp" app:
	mv $(DESTDIR)/usr/share/horde/imp/config $(DESTDIR)/etc/horde/imp
	dh_link etc/horde/imp usr/share/horde/imp/config
	# config of "turba" app:
	mv $(DESTDIR)/usr/share/horde/turba/config $(DESTDIR)/etc/horde/turba
	dh_link etc/horde/turba usr/share/horde/turba/config
	# back to debhelper:
	dh binary --buildsystem=phppear --with phppear --after dh_install
