summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2013-02-21 14:12:57 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2013-02-21 14:12:57 -0500
commit6c7d41575c421899ce39dcee6165395093f7ebda (patch)
tree78c82823c08e81befa00bb439ea6c51742f0fe66
parentdfdb289645231eebd2022f9f55c01aa5e19e8567 (diff)
downloadpki-javacard.zip
pki-javacard.tar.gz
pki-javacard.tar.xz
Fixed deployment script.javacard
-rw-r--r--base/javacard/build.xml46
1 files changed, 43 insertions, 3 deletions
diff --git a/base/javacard/build.xml b/base/javacard/build.xml
index ab57307..4dde800 100644
--- a/base/javacard/build.xml
+++ b/base/javacard/build.xml
@@ -29,7 +29,11 @@
<path location="/usr/share/java/junit4.jar"/>
</path>
- <typedef name="appletnameaid"
+ <typedef name="apdutool"
+ classname="com.sun.javacard.ant.tasks.APDUToolTask"
+ classpath="${jcdk.dir}/ant-tasks/lib/jctasks.jar" />
+
+ <typedef name="appletnameaid"
classname="com.sun.javacard.ant.types.AppletNameAID"
classpath="${jcdk.dir}/ant-tasks/lib/jctasks.jar" />
@@ -37,6 +41,10 @@
classname="com.sun.javacard.ant.tasks.ConverterTask"
classpath="${jcdk.dir}/ant-tasks/lib/jctasks.jar" />
+ <taskdef name="deploycap"
+ classname="com.sun.javacard.ant.tasks.DeployCapTask"
+ classpath="${jcdk.dir}/ant-tasks/lib/jctasks.jar" />
+
<taskdef name="scriptgen"
classname="com.sun.javacard.ant.tasks.ScriptgenTask"
classpath="${jcdk.dir}/ant-tasks/lib/jctasks.jar" />
@@ -59,7 +67,7 @@
source="1.5" target="1.5" includeantruntime="false" />
</target>
- <target name="deploy" depends="compile">
+ <target name="convert" depends="compile">
<convert
CAP="true"
EXP="true"
@@ -92,11 +100,43 @@
</exportfiles>
<classpath refid="classpath"/>
</verifycap>
+ </target>
+
+ <target name="deploy-with-apdutool">
<scriptgen
capfile="${classes.dir}/org/dogtagpki/javacard/javacard/javacard.cap"
- outfile="${classes.dir}/org/dogtagpki/javacard/javacard/javacard.scr">
+ outfile="${build.dir}/javacard.scr">
<classpath refid="classpath" />
</scriptgen>
+ <concat destfile="${build.dir}/all.scr">
+ <header trimleading="true">
+ powerup;
+
+ 0x00 0xA4 0x04 0x00 0x09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
+
+ </header>
+ <fileset file="${build.dir}/javacard.scr"/>
+ <footer trimleading="true">
+ powerdown;
+ </footer>
+ </concat>
+ <apdutool
+ scriptfile="${build.dir}/all.scr"
+ crefexe="${jcdk.dir}/bin/cref"
+ outeefile="${build.dir}/cref.data"
+ checkdownloadfailure="true">
+ <classpath refid="classpath" />
+ </apdutool>
+ </target>
+
+ <target name="deploy-with-deploycap">
+ <deploycap
+ capfile="${classes.dir}/org/dogtagpki/javacard/javacard/javacard.cap"
+ crefexe="${jcdk.dir}/bin/cref"
+ outeefile="${build.dir}/cref.data"
+ checkdownloadfailure="true">
+ <classpath refid="classpath" />
+ </deploycap>
</target>
<target name="run">