#!/usr/bin/make -f
%:
	dh $@ --buildsystem=phppear --with phppear

check_stripped_ckeditor:
	@if [ -e Horde_Editor-*/js ]; then \
	      echo " *****************************************"; \
	      echo " **                                     **"; \
	      echo " **  tar contains embedded CKEditor!    **"; \
	      echo " **                                     **"; \
	      echo " *****************************************"; \
	      echo "This library should be stripped."; \
	      echo ""; \
	      exit 1; \
	fi

override_dh_prep: check_stripped_ckeditor
	dh_prep -O--buildsystem=phppear

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=phppear
	# Remove references to embedded CKEditor
	sed -i 's@^.*js/ckeditor.*$$@@' Horde_Editor-*/package.xml

