| <?xml version="1.0"?> |
| <!-- |
| Copyright 1999-2004 The Apache Software Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <!-- $Id$ --> |
| <project name="dist"> |
| |
| <description> |
| Distribution targets |
| </description> |
| |
| <target name="dist" description="[admin] Builds the distribution"> |
| |
| <mkdir dir="${dist.root}"/> |
| <mkdir dir="${dist}"/> |
| |
| <copy todir="${dist}/tools"> |
| <fileset dir="${tools}"> |
| <exclude name="anttasks/**"/> |
| <exclude name="loader/**"/> |
| <exclude name="lib/xalan*"/> |
| <exclude name="lib/xerces*"/> |
| <exclude name="lib/jtidy*"/> |
| <exclude name="lib/xml-apis.jar"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist}/lib"> |
| <fileset dir="${lib}"/> |
| </copy> |
| |
| <copy todir="${dist}/docs"> |
| <fileset dir="docs"/> |
| </copy> |
| |
| <copy todir="${dist}/src"> |
| <fileset dir="${src}"/> |
| </copy> |
| |
| <copy todir="${dist}/legal"> |
| <fileset dir="${legal}"/> |
| </copy> |
| |
| <copy todir="${dist}" filtering="on"> |
| <fileset dir="."> |
| <include name="*.txt"/> |
| <include name="DESKTOP.INI"/> |
| <include name="*.bat"/> |
| <include name="*.sh"/> |
| <include name="KEYS"/> |
| <include name="*.xml"/> |
| <include name="*.sample"/> |
| <include name="*.properties"/> |
| <include name="*.xconf"/> |
| <exclude name="local.*"/> |
| <exclude name="announcement.xml"/> |
| </fileset> |
| </copy> |
| |
| <chmod perm="+x" file="${dist}/cocoon.sh"/> |
| <chmod perm="+x" file="${dist}/build.sh"/> |
| <chmod perm="+x" file="${dist}/tools/bin/antRun"/> |
| <fixcrlf srcdir="${dist}" includes="**.sh" eol="lf"/> |
| <fixcrlf srcdir="${dist}" includes="antRun" eol="lf"/> |
| <fixcrlf srcdir="${dist}" includes="**.bat" eol="crlf"/> |
| |
| <zip zipfile="${dist.target}/${dist.name}-src.zip" |
| basedir="${dist.root}" |
| includes="${dist.name}/**"> |
| </zip> |
| |
| <tar tarfile="${dist.target}/${dist.name}-src.tar" |
| longfile="gnu"> |
| <tarfileset dir="${dist.root}"> |
| <include name="${dist.name}/**"/> |
| <exclude name="${dist.name}/cocoon.sh"/> |
| <exclude name="${dist.name}/build.sh"/> |
| <exclude name="${dist.name}/tools/bin/antRun"/> |
| </tarfileset> |
| <tarfileset dir="${dist.root}" mode="755"> |
| <include name="${dist.name}/cocoon.sh"/> |
| <include name="${dist.name}/build.sh"/> |
| <include name="${dist.name}/tools/bin/antRun"/> |
| </tarfileset> |
| </tar> |
| <gzip zipfile="${dist.target}/${dist.name}-src.tar.gz" src="${dist.target}/${dist.name}-src.tar"/> |
| <delete file="${dist.target}/${dist.name}-src.tar"/> |
| </target> |
| |
| <target name="clean-dist" depends="clean" description="Cleans everything and brings back to original 'SVN checkout' state"> |
| <delete dir="${build.root}"/> |
| <delete dir="${tools.tasks.dest}"/> |
| <delete dir="${tools.loader.dest}"/> |
| <delete file="${dist.target}/${dist.name}-src.tar.gz"/> |
| <delete file="${dist.target}/${dist.name}-src.zip"/> |
| <delete dir="${dist.root}"/> |
| </target> |
| |
| </project> |