109 lines
5.1 KiB
XML
109 lines
5.1 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<project basedir="." default="all" name="sqldb">
|
|
|
|
<property file="override.properties"/>
|
|
|
|
<property name="release.number" value="0.1.0" />
|
|
<property name="jdbc.version" value="3.44.1.0" />
|
|
<property name="jdbc.lib" value="lib/sqlite-jdbc-${jdbc.version}.jar" />
|
|
<property name="jdbc.url" value="https://github.com/xerial/sqlite-jdbc/releases/download/${jdbc.version}/sqlite-jdbc-${jdbc.version}.jar" />
|
|
<condition property="lib.available" >
|
|
<available file="${jdbc.lib}" type="file" />
|
|
</condition>
|
|
|
|
<target name="all" depends="clean,plugin" />
|
|
|
|
<target name="jar" >
|
|
<ant dir="src" target="build" />
|
|
</target>
|
|
|
|
<target name="plugin" depends="fetchlib, jar">
|
|
<mkdir dir="plugin/" />
|
|
<mkdir dir="plugin/lib/" />
|
|
<delete>
|
|
<!-- in installer but not update -->
|
|
<fileset dir="plugin/lib/" includes="sqlite-jdbc.jar" />
|
|
</delete>
|
|
<!-- get version number -->
|
|
<buildnumber file="scripts/build.number" />
|
|
|
|
<!-- make the update xpi2p -->
|
|
<!-- this contains everything except i2ptunnel.config -->
|
|
<copy file="LICENSE.txt" todir="plugin/" overwrite="true" />
|
|
<copy file="README.txt" todir="plugin/" overwrite="true" />
|
|
<copy file="CHANGES.txt" todir="plugin/" overwrite="true" />
|
|
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="update-only=true" />
|
|
</exec>
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
</exec>
|
|
<!-- pull out musl and android -->
|
|
<jar destfile="plugin/lib/sqlite-jdbc.jar" manifest="${jdbc.lib}" filesetmanifest="mergewithoutmain" >
|
|
<zipfileset excludes="org/sqlite/native/Linux-Android org/sqlite/native/Linux-Android/**/* org/sqlite/native/Linux-Musl org/sqlite/native/Linux-Musl/**/* org/sqlite/native/Linux/ppc64 org/sqlite/native/Linux/ppc64/* org/sqlite/native/*/x86/ org/sqlite/native/*/x86/*" src="${jdbc.lib}" />
|
|
</jar>
|
|
<copy file="src/build/sqldb.jar" todir="plugin/lib/" />
|
|
<copy file="/usr/share/java/slf4j-api.jar" todir="plugin/lib/" />
|
|
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
|
|
<fail message="You must enter a password." >
|
|
<condition>
|
|
<equals arg1="${release.password.su3}" arg2=""/>
|
|
</condition>
|
|
</fail>
|
|
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
|
|
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
|
<arg value="plugin" />
|
|
</exec>
|
|
<move file="sqldb.su3" tofile="sqldb-update.su3" overwrite="true" />
|
|
|
|
<!-- make the install xpi2p -->
|
|
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
|
<!-- Files in installer but not update. Be sure to Add to delete fileset above and clean target below -->
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
</exec>
|
|
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
|
<arg value="plugin" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="fetchlib" unless="lib.available" >
|
|
<echo message="It seems that you don't have '${jdbc.lib}' deployed." />
|
|
<echo message="The build script can download this file for you automatically," />
|
|
<echo message="or alternatively you can obtain it manually from:" />
|
|
<echo message="${jdbc.url}" />
|
|
<echo message="" />
|
|
<input message="Download JDBC library automatically?" validargs="y,n" addproperty="jdbc.download" />
|
|
<fail message="Aborting as requested. Please deploy the Jetty archive manually." >
|
|
<condition>
|
|
<equals arg1="${jdbc.download}" arg2="n"/>
|
|
</condition>
|
|
</fail>
|
|
<mkdir dir="lib/" />
|
|
<get src="${jdbc.url}" verbose="true" dest="${jdbc.lib}" />
|
|
</target>
|
|
|
|
<target name="distclean" depends="clean" />
|
|
|
|
<target name="clean" >
|
|
<ant dir="src" target="clean" />
|
|
<defaultexcludes remove="**/*~"/>
|
|
<delete>
|
|
<fileset dir="." includes="*/*.~ **/*.*~ */**/*.*~ *.*~" />
|
|
</delete>
|
|
<delete file="plugin/plugin.config" />
|
|
<delete dir="plugin/lib/" />
|
|
<delete file="plugin/CHANGES.txt" />
|
|
<delete file="plugin/LICENSE.txt" />
|
|
<delete file="plugin/README.txt" />
|
|
<delete file="sqldb.xpi2p" />
|
|
<delete file="sqldb-update.xpi2p" />
|
|
<delete file="sqldb.su3" />
|
|
<delete file="sqldb-update.su3" />
|
|
<delete file="plugin.zip" />
|
|
<delete dir="plugin/" />
|
|
</target>
|
|
|
|
</project>
|