#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_clean:
	# ant clean fails if build.xml is not patched
	$(RM) -r $(CURDIR)/build

override_dh_auto_build:
	JAVA_HOME=/usr/lib/jvm/default-java ANT_OPTS=-D"file.encoding=UTF-8" \
		dh_auto_build

override_dh_auto_test:
	ANT_OPTS=-Dfile.encoding=iso-8859-1 ant compiletest

override_dh_auto_install:
	dh_auto_install
	install -m 755 debian/jabref-wrapper $(CURDIR)/debian/jabref/usr/bin/jabref

override_dh_installchangelogs:
	dh_installchangelogs src/txt/CHANGELOG
