#!/usr/bin/make -f
# debian/rules file for libcommons-modeler-java (uses cdbs)

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

JAVA_HOME_DIRS := /usr/lib/jvm/default-java
ANT_HOME := /usr/share/ant

# Additional JARs to add to the class path, either full path or just the
# basename for JARs in /usr/share/java. The ".jar" suffix may also be ommitted
DEB_JARS := mx4j commons-digester commons-logging junit

# Ant targets to call
DEB_ANT_BUILD_TARGET := dist
DEB_ANT_CHECK_TARGET := test

LIBRARY_PACKAGE := commons-modeler
API_VERSION     := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ' | cut -f1 -d-)

install/lib$(LIBRARY_PACKAGE)-java::
	install -m 644 dist/$(LIBRARY_PACKAGE).jar debian/$(cdbs_curpkg)/usr/share/java/$(LIBRARY_PACKAGE)-$(API_VERSION).jar
	ln -s $(LIBRARY_PACKAGE)-$(API_VERSION).jar debian/$(cdbs_curpkg)/usr/share/java/$(LIBRARY_PACKAGE).jar
