#!/usr/bin/make -f

include /usr/share/dpkg/default.mk


%:
	dh $@ 

override_dh_auto_clean:
	dh_auto_clean
	ant -buildfile debian/build.xml -Dbasedir=`pwd` clean

override_dh_auto_build:
	echo lombok.version=$(DEB_VERSION_UPSTREAM) > debian/lombok.version.properties
	ant -buildfile debian/build.xml -Dbasedir=`pwd` dist

newtarball = new$(DEB_VERSION_UPSTREAM).tar.gz
get-orig-source:
	wget --continue -O $(newtarball) \
		https://github.com/rzwitserloot/lombok/archive/v$(DEB_VERSION_UPSTREAM).tar.gz
	mk-origtargz \
		--rename \
		--repack \
		--exclude-file 'lombok*/website/*' \
		--compression xz \
		$(newtarball)
