Files
i2p.itoopie/apps/pants/pbuilds/fortuna/pbuild.xml
smeghead 293ceaee93 2005-02-10 smeghead
* Initial check-in of Pants, a new utility to help us manage our 3rd-party
      dependencies (Fortuna, Jetty, Java Service Wrapper, etc.). Some parts of
      Pants are still non-functional at this time so don't mess with it yet
      unless you want to potentially mangle your working copy of CVS.
2005-02-11 02:44:47 +00:00

128 lines
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="fortuna-pbuild">
<property name="gnucrypt.base.dir" value="./working/gnu-crypto" />
<property name="gnucrypt.etc.dir" value="${gnucrypt.base.dir}/etc" />
<property name="gnucrypt.lib.dir" value="${gnucrypt.base.dir}/lib" />
<property name="gnucrypt.object.dir" value="${gnucrypt.base.dir}/classes" />
<property name="gnucrypt.base.crypto.object.dir" value="${gnucrypt.object.dir}/gnu/crypto" />
<property name="gnucrypt.cipher.object.dir" value="${gnucrypt.base.crypto.object.dir}/cipher" />
<property name="gnucrypt.hash.object.dir" value="${gnucrypt.base.crypto.object.dir}/hash" />
<property name="gnucrypt.prng.object.dir" value="${gnucrypt.base.crypto.object.dir}/prng" />
<patternset id="fortuna.files">
<include name="${gnucrypt.base.crypto.object.dir}/Registry.class" />
<include name="${gnucrypt.prng.object.dir}/Fortuna*.class" />
<include name="${gnucrypt.prng.object.dir}/BasePRNG.class" />
<include name="${gnucrypt.prng.object.dir}/RandomEventListener.class" />
<include name="${gnucrypt.prng.object.dir}/IRandom.class" />
<include name="${gnucrypt.cipher.object.dir}/CipherFactory.class" />
<include name="${gnucrypt.cipher.object.dir}/IBlockCipher.class" />
<include name="${gnucrypt.hash.object.dir}/HashFactory.class" />
<include name="${gnucrypt.hash.object.dir}/IMessageDigest.class" />
</patternset>
<!--
Add this when Fortuna tests are added to GNU Crypto, else write some
-->
<target name="-test" />
<!-- ....................... Begin Public Interface ........................ -->
<!--
When this target is called, the pbuild's sources and/or binaries have
already been extracted/copied by Pants into the pbuild's working/
subdirectory. This target must prepare those sources and/or binaries in
the working/ subdirectory into deployable form, for example by building
all necessary classes and jar files.
This target must not create or modify any files outside the pbuild's
working/ subdirectory. (An automatic sandboxing mechanism should be added
to Pants at some point.) It is however acceptable for a task called by
'builddep' to modify files outside of this pbuild's working/ directory.
-->
<target name="build" depends="builddep">
<delete dir="./working/build" />
<delete dir="./working/jartemp" />
<mkdir dir="./working/build" />
<mkdir dir="./working/jartemp/${gnucrypt.object.dir}" />
<copy todir="./working/jartemp">
<fileset dir=".">
<patternset refid="fortuna.files" />
</fileset>
</copy>
<jar basedir="./working/jartemp/${gnucrypt.object.dir}" jarfile="./working/build/fortuna.jar">
<manifest>
<section name="fortuna">
<attribute name="Implementation-Title" value="I2P Custom GNU Crypto Fortuna Library" />
<attribute name="Implementation-Version" value="CVS HEAD" />
<attribute name="Implementation-Vendor" value="Free Software Foundation" />
<attribute name="Implementation-Vendor-Id" value="FSF" />
<attribute name="Implementation-URL" value="http://www.gnu.org/software/gnu-crypto" />
</section>
</manifest>
</jar>
<delete dir="./working/jartemp" />
</target>
<!--
Use this to call targets from other pbuilds, Ant buildfiles, Makefiles,
etc. which perform tasks this pbuild's 'build' target depends on. If other
pbuilds are called here, they must be called through the Pants interface
or else it may leave Pants in an inconsistent state.
Most pbuilds probably won't need to implement this target.
-->
<target name="builddep">
<ant dir="${gnucrypt.base.dir}" target="jar" />
</target>
<!--
This target must undo the actions performed by the 'build' target.
-->
<target name="clean" depends="depclean">
<delete dir="./working/jartemp" />
</target>
<!--
If the 'builddep' target is implemented, this target must be implemented
to undo its actions.
-->
<target name="depclean">
<!--
Annoyingly the GNU Crypto distclean task called here doesn't clean
*all* derived files from java/gnu-crypto/lib like it should (because
a couple of lines are commented out).....
-->
<ant dir="${gnucrypt.base.dir}" target="distclean" />
<!--
.....and so we mop up the rest ourselves.
-->
<delete dir="${gnucrypt.lib.dir}" />
</target>
<!--
This target must copy all deployable files generated by the 'build' target
into the pbuild's dist/ subdirectory (for use by other pbuilds or Ant
processes) or to their final deployment locations outside the pants/
directory hierarchy. Note that the latter may require the user to gain
superuser/admin privileges.
-->
<target name="dist" depends="build">
<copy todir="./dist/fortuna.jar" file="./working/build/fortuna.jar" />
</target>
<!--
This target must remove all files from the pbuild's dist/ subdirectory
and final deployment locations, reversing the actions of the 'dist'
target. Note that removal of files from their final deployment locations
may require the user to gain superuser/admin privileges.
-->
<target name="distclean" depends="clean">
<delete file="./dist/fortuna.jar" />
</target>
<!-- ........................ End Public Interface ......................... -->
</project>