#!/usr/bin/make -f

HORDENAME=turba
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 "turba" app:
	mv $(DESTDIR)/usr/share/horde/$(HORDENAME)/config $(DESTDIR)/etc/horde/$(HORDENAME)
	dh_link etc/horde/$(HORDENAME) usr/share/horde/$(HORDENAME)/config
	# back to debhelper:
	dh binary --buildsystem=phppear --with phppear --after dh_install

override_dh_auto_install:
	dh_auto_install -O--buildsystem=phppear
	# Remove extra license file
	rm -f $(DESTDIR)/usr/share/doc/php-horde-turba/LICENSE

