[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PROPOSAL] dh_ant



Arnaud Vandyck wrote:

I'd propose to conform to dh_* and use something like debian/ant or
debian/package.ant

I think I have a better solution. I'd like to create an Ant class for CDBS (http://build-common.alioth.debian.org/) so debian/rules will become really simple. For example, take a look at debian/rules from the latest doc++ package, it's really amazing. Imagine this as debian/rules for all Ant-based Java packages:

--- cut here ---

#!/usr/bin/make -f

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

# Java home directory
JAVA_HOME=/usr/lib/j2se/1.4

# Ant home directory (defaults to /usr/share/ant) and targets
# (defaults to default target and "install")
ANT_HOME=/usr/share/ant1.5
ANT_BUILD_TAGRET=compile
ANT_INSTALL_TAGRET=jars

# JARs from /usr/share/java to be added to the class path
CLASSPATH_JARS=xerces bsf servlet-2.3

install/package::
        # Additional steps for installing the package, like the version
	# symlink in /usr/share/java

--- cut here ---

You only have to create debian/ant.properties and some debhelper files like debian/package.docs, debian/package.install and debian/package.examples.

The Ant class can also handle DEB_BUILD_OPTIONS and pass additional arguments like javac.debug and javac.optimize to Ant. It can even automatically switch to a gcj's native compiler at a later stage without any need for changes in debian/rules.

However, I think libant1.5-java should move to main first so we have some experience with this and know that it really works. I don't want to make major changes to the Ant class when it's already in use by a lot of packages.

Stefan



Reply to: