#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem=eclipse_bundles

override_dh_gencontrol:
	# Use the bundle versions as package versions
	awk 'system("dh_gencontrol -p"$$4" -- -v"$$2"+eclipse$(DEB_VERSION)")' debian/bundles.properties

	# Use the version of org.eclipse.jdt.core bundle for the ecj command line tool
	#export ECJ_VERSION=${shell grep org.eclipse.jdt.core debian/bundles.properties | cut -f 2}
	dh_gencontrol -pecj -- -v${shell grep org.eclipse.jdt.core debian/bundles.properties | cut -f 2}+eclipse$(DEB_VERSION)
