#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/osgi.core.jar:/usr/share/java/osgi.compendium.jar

%:
	dh $@ --with javahelper,maven-repo-helper

override_jh_build:
	jh_build -N geronimo-osgi-registry.jar geronimo-osgi-registry/src/main
	CLASSPATH=$${CLASSPATH}:./geronimo-osgi-registry.jar jh_build -N \
		geronimo-osgi-locator.jar geronimo-osgi-locator/src/main
	ant -f debian/build.xml javadoc

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
	uscan \
		--verbose \
		--no-symlink \
		--destdir $(CURDIR)      \
		--watchfile debian/watch \
		--force-download
