</target>
<target name="sourcedist" description="create jalview source distribution" depends="init">
<delete file="${source.dist.name}" />
- <tar destfile="${source.dist.name}" compression="gzip">
- <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
+ <!-- temporary copy of source to update timestamps -->
+ <copy todir="_sourcedist">
+ <fileset dir=".">
<include name="LICENSE" />
<include name="README" />
<include name="build.xml" />
<include name="utils/**/*" />
<include name="${docDir}/**/*" />
<include name="examples/**/*" />
+ </fileset>
+ </copy>
+
+ <tstamp prefix="build">
+ <format property="year" pattern="yyyy" />
+ </tstamp>
+ <replace value="${JALVIEW_VERSION}">
+ <replacetoken>
+ <![CDATA[$$Version-Rel$$]]>
+ </replacetoken>
+ <fileset dir="_sourcedist">
+ <include name="**/*" />
+ </fileset>
+ </replace>
+ <replace dir="_sourcedist" value="${build.year}">
+ <replacetoken>
+ <![CDATA[$$Year-Rel$$]]>
+ </replacetoken>
+ <fileset dir="_sourcedist">
+ <include name="**/*" />
+ </fileset>
+ </replace>
+
+ <tar destfile="${source.dist.name}" compression="gzip">
+ <tarfileset dir="_sourcedist/" prefix="jalview" preserveLeadingSlashes="true">
</tarfileset>
</tar>
+
+ <delete dir="_sourcedist" />
</target>
<target name="prepubapplet_1" depends="makeApplet">
<copy todir="${packageDir}/examples">