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

# DEB_TAR_SRCDIR has to be defined (It's the directory that is unpacked from
# the tarball).
#UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -\d' ' | cut -f1 -d- | sed -e "s/\./_/g")
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -\d' ' | cut -f1 -d- )
DEB_TAR_SRCDIR   := commons-collections-$(UPSTREAM_VERSION)
TOOLS_SRCDIR     := tools

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/class/ant.mk

# Directories to look for JAVA_HOME (JDK 1.4+ required!)
JAVA_HOME_DIRS := /usr/lib/kaffe
# JAVA_HOME_DIRS := /usr/lib/j2sdk1.4-sun
ANT_HOME := /usr/share/ant1.6

# 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 := /usr/share/ant1.6/lib/ant-launcher.jar # gjdoc.jar xml-apis.jar xercesImpl.jar xmlParserAPIs.jar xalan2.jar 

# Build compiler
DEB_ANT_COMPILER := jikes

# Ant targets to call
DEB_ANT_BUILD_TARGET := jar # javadoc

pre-build:: 

install/libcommons-collections3-java::
	mkdir -p debian/libcommons-collections3-java/usr/share/java
                                           
	install -m 644 $(DEB_SRCDIR)/build/commons-collections-3.1.jar debian/libcommons-collections3-java/usr/share/java/commons-collections3-3.1.jar

install/libcommons-collections3-java::
	mkdir -p debian/libcommons-collections3-java-doc/usr/share/doc/libcommons-collections3-java-doc
#	cp -r $(DEB_SRCDIR)/build/docs/apidocs debian/libcommons-collections3-java-doc/usr/share/doc/libcommons-collections3-java-doc


