#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --with javahelper,maven_repo_helper

override_dh_clean:
	dh_clean
	$(RM) -r dist

override_dh_auto_build:
	mkdir -p build
	cp -r src/main main_backup
	cp -r lombok.ast_generatedSource/* src/main/
	cp -r lombok.ast_generatedSource build
	ant dist
	$(RM) -r src/main
	mv main_backup src/main

override_jh_linkjars:
	jh_linkjars
	$(RM) \
			lib/runtime/ant* \
			lib/runtime/jsch* \
			lib/runtime/ecj* \
			lib/runtime/eclipse* \
			lib/runtime/asm* \
			lib/runtime/lombok-1* \
			lib/runtime/lombok.jar \
			lib/runtime/com.zwitserloot* \
			lib/runtime/ivy* \
			lib/runtime/parboiled* \
			lib/runtime/jsr* \
			lib/runtime/maven-repo-helper* \
			lib/runtime/com.intellij*

