Skip to content

Commit

Permalink
Improved build process, fixes #278
Browse files Browse the repository at this point in the history
botic committed Dec 22, 2014
1 parent d553b88 commit 03a8df2
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions build.xml
Original file line number Diff line number Diff line change
@@ -274,28 +274,45 @@
</java>
</target>

<!-- =================================================================== -->
<!-- Checks if /packages is empty to prevent shipping its content -->
<!-- =================================================================== -->
<target name="packages-empty" depends="init">
<fail message="/packages is not empty, but needs to be for a packaged build!">
<condition>
<resourcecount when="greater" count="0">
<dirset dir="${home}/packages/" includes="*" />
</resourcecount>
</condition>
</fail>
</target>

<!-- =================================================================== -->
<!-- Create zipped files for distribution -->
<!-- =================================================================== -->
<target name="package" depends="jar,docs,test">
<target name="package" depends="packages-empty,jar,docs,test">
<!-- These files need chmod 755 -->
<property name="package-binaries" value="bin/ringo,bin/ringo-admin,bin/ringo-web,bin/ringo-doc"/>
<property name="package-excludes" value="bin/ringo,bin/ringo-admin,bin/ringo-web,bin/ringo-doc,bin/rp,build/**,*.zip,*.o,*.tar,*.tar.gz,.*/**,bin/rp" />

<zip zipfile="../${project}-${version}.zip">
<zipfileset dir="${home}" prefix="${project}-${version}"
excludes="build/**,*.zip,*.o,*.tar,*.tar.gz,.*/**" />
<zipfileset dir="${home}" prefix="${project}-${version}" filemode="755" includes="${package-binaries}" />
<zipfileset dir="${home}" prefix="${project}-${version}" excludes="${package-excludes}" />
</zip>

<tar tarfile="../${project}-${version}.tar">
<tarfileset dir="${home}" prefix="${project}-${version}"
filemode="755" includes="bin/ringo,bin/ringo-admin,bin/ringo-web" />
<tarfileset dir="${home}" prefix="${project}-${version}"
excludes="bin/ringo,bin/ringo-admin,bin/ringo-web,build/**,*.zip,*.o,*.tar,*.tar.gz,.*/**" />
<tarfileset dir="${home}" prefix="${project}-${version}" filemode="755" includes="${package-binaries}" />
<tarfileset dir="${home}" prefix="${project}-${version}" excludes="${package-excludes}" />
</tar>
<gzip src="../${project}-${version}.tar" destfile="../${project}-${version}.tar.gz"/>
<delete file="../${project}-${version}.tar"/>

</target>

<!-- =================================================================== -->
<!-- Create a debian package -->
<!-- =================================================================== -->
<target name="dpkg">
<target name="dpkg" depends="packages-empty">
<exec executable="dpkg-buildpackage">
<arg value="-rfakeroot"/>
<arg value="-b"/>

0 comments on commit 03a8df2

Please sign in to comment.