Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (58 sloc) 2.42 KB
<project name="stream-m" default="dist" basedir=".">
<description>
stream.m is a video broadcasting tool compatible with Google's WebM format.
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="classes" location="classes"/>
<property name="dist" location="dist"/>
<property name="webclient" location="webclient"/>
<property name="debug" value="true"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${dist}"/>
<mkdir dir="${classes}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${classes}" debug="${debug}" includeantruntime="false"/>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Create JAR file from all the classes -->
<jar jarfile="${dist}/lib/stream-m.jar" basedir="${classes}"/>
<!-- Create ZIP file for the web client -->
<zip destfile="${dist}/console.zip" basedir="${webclient}"/>
<!-- Copy sample configuration file -->
<copy file="server.conf.sample" todir="${dist}"/>
<!-- Copy GPL license file -->
<copy file="GPL.txt" todir="${dist}"/>
<!-- Copy README file -->
<copy file="README.rst" todir="${dist}"/>
</target>
<target name="package" depends="dist" description="generate download package">
<!-- Delete earlier distribution packages if any -->
<delete>
<fileset dir="${dist}" includes="stream-m-*.zip"/>
</delete>
<!-- Get SVN revision -->
<exec executable="svn" output="${dist}/svn.properties">
<arg value="info" />
</exec>
<property prefix="svn" file="${dist}/svn.properties"/>
<!-- SVN info temp file -->
<delete file="${dist}/svn.properties"/>
<!-- Report SVN revision number -->
<echo>SVN Revision: ${svn.Revision}</echo>
<!-- Compress everything to a release ZIP file -->
<zip destfile="${dist}/stream-m-r${svn.Revision}-${DSTAMP}.zip" basedir="${dist}"/>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${classes} and ${dist} directory trees -->
<delete dir="${classes}"/>
<delete dir="${dist}"/>
</target>
</project>