#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := junit
DEB_ANT_BUILD_TARGET := jar javadoc
LAST_MODIFIED        := $(shell date +%s%N | cut -c -13)
DEB_ANT_ARGS         := -Dlastmodified=$(LAST_MODIFIED)

common-post-build-indep::
	mv build/apidocs build/api

install/libcommons-lang-java::
	mh_installpoms -p$(PACKAGE)
	mh_installjar -p$(PACKAGE) -l pom.xml build/commons-lang-$(VERSION).jar

clean::
	-rm gjdoc_rawcomment.cache
	-rm -rf docs/api/*
	-rm -rf debian/tmp
	mh_clean

get-orig-source:
	-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename

