Info4: <<
Package: ant-base
Version: 1.9.14
Revision: 1
Description: Java based build tool
Type: java
License: BSD
Maintainer: Benjamin Reed <ant-base@fink.raccoonfink.com>

Depends: system-java (>= 1.5-1)
BuildDepends: fink (>= 0.29.7-1)
Replaces: ant (<< 1.6.5-1)

#Source: mirror:apache:ant/binaries/apache-ant-%v-bin.tar.bz2
Source: http://archive.apache.org/dist/ant/binaries/apache-ant-%v-bin.tar.bz2
Source-Checksum: SHA256(efad74bd98d9eb72b080a3e08f5b17118e05372d22e3aa3bc0bd1686aa71361c)
SourceDirectory: apache-ant-%v

UseMaxBuildJobs: true
CompileScript: echo "none needed"

PatchScript: perl -pi -e "s|/System/Library/Frameworks/JavaVM.framework/Home|`/usr/libexec/java_home`|g" bin/ant
InstallScript: <<
#!/bin/sh -ex

 # Dump the entire application into %i/lib/ant
 mkdir -p %i/lib/ant
 cp -R . %i/lib/ant
 
 # make up for failing build.xml
 chmod -R ugo+r %i/lib/ant
 
 # docs
 install -d -m 755 %i/share/doc/%N/html
 mv %i/lib/ant/manual/* %i/share/doc/%N/html
 mv %i/lib/ant/lib/README %i/share/doc/%N/README.lib
 rm %i/lib/ant/{INSTALL,KEYS,LICENSE,NOTICE,README,WHATSNEW}
 rmdir %i/lib/ant/manual
 
 # binaries
 install -d -m 755 %i/bin
 cp -R bin/* %i/bin
 rm -f %i/bin/*.bat
 rm -f %i/bin/*.cmd
<<
DocFiles: INSTALL KEYS LICENSE* NOTICE README WHATSNEW
RuntimeVars: ANT_HOME: %p/lib/ant
SplitOff: <<
	Package: ant-junit
	Description: JUnit plugin for Ant
	Depends: ant-base (>= %v-%r)
	DocFiles: LICENSE*
	Files: <<
		lib/ant/etc/junit*
		lib/ant/lib/*junit*
	<<
<<
SplitOff2: <<
	Package: ant-optional
	Description: Optional tasks for Ant
	Depends: ant-base (>= 1.9.7-1)
	Recommends: <<
		antlr (>= 2.7.4-3),
		bcel,
		commons-logging,
		commons-net,
		jakarta-bsf (>= 2.3.0-3),
		jakarta-oro (>= 2.0.7-1),
		jakarta-regexp (>= 1.3-1),
		javamail,
		jdepend (>= 2.6-4),
		jsch,
		junit,
		jzlib,
		log4j,
		netrexx,
		xalan-j
	<<
	DocFiles: LICENSE*
	Files: <<
		lib/ant/lib/ant-antlr.*
		lib/ant/lib/ant-apache-bcel.*
		lib/ant/lib/ant-apache-bsf.*
		lib/ant/lib/ant-apache-log4j.*
		lib/ant/lib/ant-apache-oro.*
		lib/ant/lib/ant-apache-regexp.*
		lib/ant/lib/ant-apache-resolver.*
		lib/ant/lib/ant-commons-logging.*
		lib/ant/lib/ant-commons-net.*
		lib/ant/lib/ant-jai.*
		lib/ant/lib/ant-javamail.*
		lib/ant/lib/ant-jdepend.*
		lib/ant/lib/ant-jmf.*
		lib/ant/lib/ant-jsch.*
		lib/ant/lib/ant-netrexx.*
		lib/ant/lib/ant-swing.*
	<<
<<
SplitOff3: <<
	Package: ant
	Depends: <<
		ant-base (>= %v-%r),
		ant-junit (>= %v-%r),
		ant-optional (>= %v-%r)
	<<
	DocFiles: LICENSE*
<<

Homepage: http://ant.apache.org/
DescDetail: <<
Ant is different. Instead of a model where it is extended with shell
based commands, it is extended using Java classes. Instead of writing
shell commands, the configuration files are XML based calling out a
target tree where various tasks get executed. Each task is run by an
object which implements a particular Task interface.

Granted, this removes some of the expressive power that is inherent by
being able to construct a shell command such as `find . -name foo
-exec rm {}` but it gives you the ability to be cross platform. To
work anywhere and everywhere. And hey, if you really need to execute a
shell command, Ant has an exec rule that allows different commands to
be executed based on the OS that it is executing on.
<<
DescPort: <<
The chmod task of ant would fail with Java: UNIXProcess:forkAndExec: exec
failed: Argument list too long because apprently it tries to chmod thousands of
files in a single line of command, another solution is to set parallel to
false, which cause chmod to process one file after the other but then we get a
java.io.IOException: Too many open files. Conclusion was to use unix chmod in
InstallScript ;-)
Removed *.bat and *.cmd in bin
Patch bin/ant to use java_home executable for setting JAVA_HOME.
<<
<<