#!/usr/bin/make -f

%:
	dh $@

export DEB_PLUGINS_PKG_DIR=$(shell pwd)/debian/jpilot-plugins
export DEB_PLUGINS_DIR=$(DEB_PLUGINS_PKG_DIR)/usr/lib/jpilot/plugins

override_dh_auto_configure:
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	dh_auto_configure

override_dh_auto_clean:
	# only make clean if the Makefile exists
	if [ -e Makefile ] ; then \
		$(MAKE) distclean ; fi
