| <project name='Intellij debian packager' default='deb'> |
| <property name='product' value='idea'/> |
| <property name='build' value='IU-98.486'/> |
| <property name='version' value='10.0-${build}-RC2'/> |
| <property name='build.dir' value='deb'/> |
| |
| <property name='jdeb.url' value='http://vafer.org/projects/jdeb/versions/0.7/jdeb_0.7.zip'/> |
| <available property='deps.retrieved' file='deps/done'/> |
| |
| <target name='retrieve-deps' unless='deps.retrieved'> |
| <mkdir dir='deps'/> |
| <get src='${jdeb.url}' dest='deps/jdeb.zip'/> |
| <unjar src='deps/jdeb.zip' dest='deps'/> |
| </target> |
| |
| <target name='deb' depends='retrieve-deps'> |
| <delete dir='${build.dir}'/> |
| <mkdir dir='${build.dir}/control'/> |
| <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask"> |
| <classpath> |
| <fileset dir='deps' includes='*.jar'/> |
| </classpath> |
| </taskdef> |
| <copy todir="${build.dir}/control"> |
| <fileset dir="control"/> |
| <filterset begintoken="@" endtoken="@"> |
| <filter token="product" value="${product}"/> |
| <filter token="build" value="${product}${build}"/> |
| <filter token="package_name" value="${product}-${build}"/> |
| <filter token="version" value="${version}"/> |
| </filterset> |
| </copy> |
| <deb destfile="${build.dir}/${product}-${version}.deb" control="${build.dir}/control"> |
| <tarfileset dir='bin' prefix='/usr/bin' filemode="755"/> |
| <tarfileset dir='desktop' prefix='/usr/share/applications'/> |
| </deb> |
| </target> |
| </project> |
| |