#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_configure:
	cp build.xml debian/
	sed -i 's/"build.version" value="$${DSTAMP}"/"build.version" value="'${DEB_VERSION_UPSTREAM}'"/g' build.xml
	dh_auto_configure

override_dh_auto_test:
	ant test

override_dh_auto_install:
	dh_auto_install
	cd lib && ln -s grammatica-*.jar grammatica.jar

override_dh_auto_clean:
	-test -e debian/build.xml && mv debian/build.xml .
	rm -rf classes doc grammatica-*.zip lib
