[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

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

# Ant home directory (defaults to /usr/share/ant) and targets
# (defaults to default target and "install")

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

        # 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.


Reply to: