You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jitsi/resources/install/build.xml

3965 lines
175 KiB

<?xml version="1.0"?>
<!--
Installation procedure.
The install scripts are located inside the resources/install directory . The
files are separated in subdirectories according to distribution - generic,
linux, windows, macosx.
1. For building any of the distributions you must fill in the
path to the installation of IzPack. For instructions on how to install
izPack please referer to http://www.izforge.com/izpack/. And uncomment the
taskdef of izpack in this file.
2. When building the linux installation package you must set the
linux.jre.path variable to point to a location containing an extracted jre
so that it could be bundled inside the installation package.
3. When building the windows installation package you must set the
windows.jre.file variable. This is the path to an installation file of a
jre (online or offline one). The 7zip software package
(http://www.7-zip.org) must also be installed.
4. When changing the application version things you must do:
- generic
- there is app-version variable in the izpack installer xml
- linux
- there is app-version variable in the izpack installer xml
- windows
- there is app-version variable in the izpack installer xml
- you must change the installer jar name in the launcher.ini file
-->
<project name="jitsi-installer" basedir="." default="ant-usage">
<import file="../../build.xml"/>
<!-- Load installer properties -->
<!-- USERS NEED TO UPDATE THIS FILE -->
<property file="${inst.resrc}/installers.properties"/>
<target name="load-properties">
<!-- load properties on demand here so it can evaluate
and sip-communicator.version property from property file-->
<property file="${inst.resrc}/ant-build-config.properties"/>
<!--
Provide access to the environment variables via the prefix "env."
because we will modify at least the PATH where is needed.
-->
<property environment="env" />
<condition property="application.company.name" value="jitsi.org">
<not>
<isset property="application.company.name" />
</not>
</condition>
</target>
<!-- define the izpack task in a separate target so that we don't get an
error when izpack properties are not set-->
<target name="define-izpack-task">
<taskdef name="izpack" classpath="${izpack.dir}/lib/compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
</target>
<!-- include ant-contrib tasks-->
<target name="define-ant-contrib-task">
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${inst.resrc}/lib/ant-contrib-1.0b3.jar"/>
</target>
<!-- Put here the Windows release directory -->
<property name="windows.app.dir" value="${sc.basedir}/${release}/windows"/>
<!-- Put here the Linux release directory -->
<property name="linux.app.dir" value="${sc.basedir}/${release}/linux"/>
<!-- Put here the Generic release directory -->
<property name="generic.app.dir" value="${sc.basedir}/${release}/generic"/>
<!-- The path to the dpkg-scanpackages tool -->
<property name="dpkg-scanpackages" value="/usr/bin/dpkg-scanpackages"/>
<!-- The path to the dpkg-buildpackage tool -->
<property name="dpkg-buildpackage" value="/usr/bin/dpkg-buildpackage"/>
<!-- The path to the dh_testdir tool -->
<property name="dh_testdir" value="/usr/bin/dh_testdir"/>
<!-- change the 7zip executable corresponding the OS
7-zip is used to create windows self-extract installer binary
In order to work 7-zip must be installed and tobe in the path
For Debian linux use : apt-get install p7zip
For other go to : http://www.7-zip.org/
-->
<condition property="7zip.executable" value="7z">
<os family="windows"/>
</condition>
<condition property="7zip.executable" value="7z">
<equals arg1="${os.name}" arg2="linux"
casesensitive="false" trim="true"/>
</condition>
<!-- Put here the release directory -->
<property name="macosx.app.dir" value="${release}/macosx"/>
<!-- Put here the resource directory -->
<property name="macosx.resrc.dir" value="${inst.resrc}/macosx"/>
<!-- The release directory for Debian packages -->
<property name="debian.dir" value="${release}/debian"/>
<property name="debian.binary.dir" value="${debian.dir}/binary"/>
<property name="debian.tmp.dir" value="${debian.dir}/tmp" />
<!-- Can we build debian packages? -->
<condition property="dpkg.build.present">
<and>
<available file="${dpkg-buildpackage}"/>
<available file="${dh_testdir}"/>
</and>
</condition>
<!-- Can we deploy debian packages? -->
<condition property="dpkg.scan.present">
<available file="${dpkg-scanpackages}"/>
</condition>
<!-- default Ant target does nothing except print helpful options -->
<target name="ant-usage"
description="simply execute 'ant' to discover the most useful targets.">
<echo message="Useful ant commands for the Jitsi Build Installer..." />
<echo message="'ant build-installation-generic' for building generic installator jar" />
<echo message="'ant build-installation-linux' for building linux instalation file" />
<echo message="'ant build-installation-wix' for building Windows MSI instalation file using WiX" />
<echo message="'ant build-installation-wix-64' for building Windows x64 MSI instalation file using WiX" />
</target>
<target name="clean-install-generic">
<delete dir="${generic.app.dir}"/>
<mkdir dir="${generic.app.dir}"/>
</target>
<target name="build-installation-generic"
depends="clean-install-generic,define-izpack-task,version,load-properties">
<propertyfile file="${generic.app.dir}/versionupdate.properties"
comment="Last Build Version">
<entry key="last_version" value="${sip-communicator.version}"/>
<entry key="download_link"
value="${link.download.generic}"/>
</propertyfile>
<filter token="VERSION" value="${sip-communicator.version}" />
<filter token="BUILDDATE" value="${build.date}" />
<filter token="PKG_NAME" value="${package.name}" />
<filter token="APP_NAME" value="${application.name}" />
<filter token="APP_EMAIL" value="${application.email}" />
<filter token="APP_WEB" value="${application.web}" />
<filter token="DEST_DIR" value="${release}" />
<filter token="WelcomeText1" value="${installer.welcome.wtext1}" />
<filter token="WelcomeText2" value="${installer.welcome.wtext2}" />
<filter token="WelcomeText3" value="${installer.welcome.wtext3}" />
<copy
tofile="${generic.app.dir}/tmp-installer-generic.xml"
file="${inst.resrc}/generic/installer-generic.xml"
filtering="yes" />
<copy
tofile="${generic.app.dir}/tmp-linux_shortcut_specification.xml"
file="${inst.resrc}/linux/linux_shortcut_specification.xml"
filtering="yes" />
<izpack
input="${generic.app.dir}/tmp-installer-generic.xml"
output="${generic.app.dir}/${package.name}-${sip-communicator.version}.jar"
installerType="standard"
izPackDir="${izpack.dir}/"
basedir="${sc.basedir}"/>
<delete quiet="yes" failonerror="false">
<fileset dir="${generic.app.dir}">
<include name="tmp-*"/>
</fileset>
</delete>
</target>
<target name="clean-install-linux">
<delete dir="${linux.app.dir}"/>
<mkdir dir="${linux.app.dir}"/>
<mkdir dir="${linux.app.dir}/tmp"/>
</target>
<target name="build-installation-linux"
depends="clean-install-linux,define-izpack-task,version,load-properties">
<propertyfile file="${linux.app.dir}/versionupdate.properties"
comment="Last Build Version">
<entry key="last_version" value="${sip-communicator.version}"/>
<entry key="download_link"
value="${link.download.linux}"/>
</propertyfile>
<filter token="VERSION" value="${sip-communicator.version}" />
<filter token="BUILDDATE" value="${build.date}" />
<filter token="PKG_NAME" value="${package.name}" />
<filter token="APP_NAME" value="${application.name}" />
<filter token="APP_EMAIL" value="${application.email}" />
<filter token="APP_WEB" value="${application.web}" />
<filter token="DEST_DIR" value="${release}" />
<filter token="WelcomeText1" value="${installer.welcome.wtext1}" />
<filter token="WelcomeText2" value="${installer.welcome.wtext2}" />
<filter token="WelcomeText3" value="${installer.welcome.wtext3}" />
<copy todir="${linux.app.dir}/tmp" filtering="yes" >
<fileset dir="${inst.resrc}/linux">
<include name="setup.sh"/>
<include name="inst_path"/>
</fileset>
</copy>
<!-- copy the jre -->
<mkdir dir="${linux.app.dir}/tmp/jre" />
<copy todir="${linux.app.dir}/tmp/jre">
<fileset dir="${linux.jre.path}">
<include name="**/*"/>
</fileset>
</copy>
<copy
tofile="${linux.app.dir}/tmp/tmp-installer-linux.xml"
file="${inst.resrc}/linux/installer-linux.xml"
filtering="yes" />
<copy
tofile="${linux.app.dir}/tmp-linux_shortcut_specification.xml"
file="${inst.resrc}/linux/linux_shortcut_specification.xml"
filtering="yes" />
<!-- Prepare felix.client.run.properties and put some specific bundles -->
<copy file="${lib}/felix.client.run.properties"
tofile="${inst.resrc}/linux/felix.client.run.properties"
overwrite="true"/>
<replace file="${inst.resrc}/linux/felix.client.run.properties"
token="reference:file:sc-bundles/swingnotification.jar \">
<replacevalue><![CDATA[reference:file:sc-bundles/galagonotification.jar \
reference:file:sc-bundles/swingnotification.jar \]]></replacevalue>
</replace>
<!-- create izpack installer jar file -->
<izpack input="${linux.app.dir}/tmp/tmp-installer-linux.xml"
output="${linux.app.dir}/tmp/${package.name}-${sip-communicator.version}-linux.jar"
installerType="standard"
basedir="${sc.basedir}"
izPackDir="${izpack.dir}/"/>
<!-- Create self extract linux binary-->
<tar tarfile="${linux.app.dir}/tmp/install.tar"
basedir="${linux.app.dir}/tmp"/>
<gzip zipfile="${linux.app.dir}/tmp/install.tar.gz"
src="${linux.app.dir}/tmp/install.tar"/>
<concat destfile="${linux.app.dir}/${package.name}-${sip-communicator.version}-linux.bin"
binary="true">
<fileset dir="${inst.resrc}/linux/">
<include name="sfx-header"/>
</fileset>
<fileset dir="${linux.app.dir}/tmp">
<include name="install.tar.gz"/>
</fileset>
</concat>
<chmod file="${linux.app.dir}/${package.name}-${sip-communicator.version}-linux.bin" perm="+x"/>
<!-- Delete the temp directory-->
<delete dir="${linux.app.dir}/tmp"/>
<delete file="${inst.resrc}/linux/felix.client.run.properties"/>
<delete quiet="yes" failonerror="false">
<fileset dir="${linux.app.dir}">
<include name="tmp-*"/>
</fileset>
</delete>
</target>
<target name="clean-install-windows">
<delete dir="${windows.app.dir}"/>
<mkdir dir="${windows.app.dir}"/>
<mkdir dir="${windows.app.dir}/tmp"/>
</target>
<target name="build-installation-wix"
depends="version,load-properties">
<property name="windows_native_path" value="${sc.basedir}\lib\native\windows"/>
<property name="windows.jre.arch.file" value="${windows.jre.file}"/>
<condition property="windows.jre.arch.zip" value="${windows.jre.zip}">
<isset property="windows.jre.zip" />
</condition>
<property name="windows.download.link" value="${link.download.windows32}"/>
<property name="windows.package.name.suffix" value="x86.exe"/>
<property name="windows.msi.package.name.suffix" value="x86.msi"/>
<property name="windows.arch" value="32"/>
<property name="mingw.home" value="C:/mingw/x86" />
<antcall target="build-installation-wix-base" />
</target>
<target name="build-installation-wix-64"
depends="version,load-properties">
<property name="windows_native_path" value="${sc.basedir}\lib\native\windows-64"/>
<property name="windows.jre.arch.file" value="${windows.jre64.file}"/>
<condition property="windows.jre.arch.zip" value="${windows.jre64.zip}">
<isset property="windows.jre64.zip" />
</condition>
<property name="windows.download.link" value="${link.download.windows64}"/>
<property name="windows.package.name.suffix" value="x64.exe"/>
<property name="windows.msi.package.name.suffix" value="x64.msi"/>
<property name="windows.arch" value="64"/>
<property name="mingw.home" value="C:/mingw/x64" />
<antcall target="build-installation-wix-base" />
</target>
<target name="unzip-windows-jre" if="windows.jre.arch.zip.isset">
<unzip
src="${unzip.windows.jre.src}"
dest="${unzip.windows.jre.dest}" />
<property name="unzip.windows.jre.dir" value="" />
<delete failonerror="false" includeemptydirs="true" quiet="true">
<fileset
casesensitive="false"
defaultexcludes="false"
dir="${unzip.windows.jre.dest}/jre">
<include name="bin/rmid.exe" />
<include name="bin/rmiregistry.exe" />
<include name="bin/tnameserv.exe" />
<include name="bin/keytool.exe" />
<include name="bin/kinit.exe" />
<include name="bin/klist.exe" />
<include name="bin/ktab.exe" />
<include name="bin/policytool.exe" />
<include name="bin/orbd.exe" />
<include name="bin/servertool.exe" />
<include name="bin/javaws.exe" />
<include name="lib/javaws.jar" />
<include name="lib/javaws/**" />
<include name="bin/javacpl.exe" />
<include name="bin/jucheck.exe" />
<include name="bin/jusched.exe" />
<include name="bin/wsdetect.dll" />
<include name="bin/npjpi*.dll" />
<include name="bin/npjava11.dll" />
<include name="bin/npjava12.dll" />
<include name="bin/npjava13.dll" />
<include name="bin/npjava14.dll" />
<include name="bin/npjava32.dll" />
<include name="bin/npoji610.dll" />
<include name="bin/regutils.dll" />
<include name="bin/axbridge.dll" />
<include name="bin/deploy.dll" />
<include name="bin/jpicom.dll" />
<include name="bin/javacpl.cpl" />
<include name="bin/jpiexp.dll" />
<include name="bin/jpinscp.dll" />
<include name="bin/jpioji.dll" />
<include name="bin/jpishare.dll" />
<include name="lib/deploy.jar" />
<include name="lib/plugin.jar" />
<include name="bin/new_plugin/**" />
<include name="bin/jp2*.exe" />
<include name="lib/deploy/**" />
<include name="bin/jqs*.exe" />
</fileset>
</delete>
</target>
<target name="build-installation-wix-base"
depends="clean-install-windows,define-ant-contrib-task">
<property name="windows.package.name"
value="${package.name}-${sip-communicator.version}-${windows.package.name.suffix}"/>
<property name="windows.msi.package.name"
value="${package.name}-${sip-communicator.version}-${windows.msi.package.name.suffix}"/>
<!--
This versionupdate.properties file isn't of interest to the MSI but
is necessary for the site.
-->
<propertyfile file="${windows.app.dir}/versionupdate.properties">
<entry key="last_version" value="${sip-communicator.version}" />
<entry key="download_link"
value="${windows.download.link}" />
<entry key="changes_html" value="updates/index.html" />
</propertyfile>
<!-- removes spaces from application name if any -->
<propertyregex property="app.exe.filename"
input="${application.name}"
regexp=" "
replace=""
override="true"
global="true"
defaultValue="${application.name}"/>
<!-- removes -,_ from app.exe.filename if any -->
<propertyregex property="app.exe.filename"
input="${app.exe.filename}"
regexp="[-_]"
replace=""
override="true"
global="true"
defaultValue="${app.exe.filename}"/>
<!-- if wix.app.launcher.name is not set use app.exe.filename
If using wix.app.launcher.name make sure not to use spaces,-,_
in the name.
-->
<condition property="wix.app.launcher.name"
value="${app.exe.filename}">
<not>
<isset property="wix.app.launcher.name" />
</not>
</condition>
<!--
Prepare for the execution of heat.exe (which is part of the
preparation for the execution of candle.exe).
-->
<property name="light.dir" value="${windows.app.dir}/tmp/light" />
<mkdir dir="${light.dir}" />
<!-- Build run.exe (which is the launcher of the application). -->
<exec
dir="${src}/native/windows/run"
executable="make.exe"
failonerror="true">
<env key="PATH" path="${mingw.home}/bin;${env.PATH}" />
<arg value="PRODUCTNAME=${application.name}" />
<arg value="COMPANYNAME=${application.company.name}" />
<arg value="MINGW_HOME=${mingw.home}" />
<arg value="TARGET_DIR=${light.dir}" />
<arg value="PRODUCTBUILDVERSION=${sip-communicator.version}" />
<arg value="TARGET_BASENAME=${wix.app.launcher.name}" />
</exec>
<antcall target="wix-sign-file">
<param name="file.to.sign" value="${light.dir}/${wix.app.launcher.name}.exe"/>
</antcall>
<delete>
<fileset dir="${light.dir}">
<include name="config.h" />
<include name="run.res" />
</fileset>
</delete>
<copy todir="${light.dir}" overwrite="true">
<fileset dir="${inst.resrc}/windows">
<include name="sc-logo.ico" />
</fileset>
</copy>
<antcall target="enable-splash">
<param name="target.dir" value="${light.dir}"/>
</antcall>
<mkdir dir="${light.dir}/lib" />
<copy todir="${light.dir}/lib" overwrite="true">
<fileset dir="${sc.basedir}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${sc.basedir}/lib/os-specific/windows"
erroronmissingdir="false">
<include name="*.jar" />
<exclude name="jmf.jar"/>
<exclude name="sound.jar"/>
</fileset>
<fileset dir="${sc.basedir}/lib">
<include name="felix.client.run.properties" />
</fileset>
<fileset dir="${sc.basedir}/lib">
<include name="jitsi-defaults.properties" />
<include name="jitsi-default-overrides.properties" />
</fileset>
<fileset dir="${sc.basedir}/resources/install">
<include name="logging.properties" />
</fileset>
</copy>
<!-- Add the windows specific bundle path in the felix.client.run.properties file -->
<echo file="${light.dir}/lib/felix.client.run.properties"
append="true">felix.auto.start.14= reference:file:sc-bundles/windows-clean-shutdown.jar
</echo>
<mkdir dir="${light.dir}/lib/bundle" />
<copy todir="${light.dir}/lib/bundle" overwrite="true">
<fileset dir="${sc.basedir}/lib/bundle">
<include name="*.jar" />
<exclude name="junit.jar" />
</fileset>
</copy>
<mkdir dir="${light.dir}/native" />
<copy todir="${light.dir}/native" overwrite="true">
<fileset dir="${windows_native_path}">
<include name="*" />
</fileset>
</copy>
<antcall target="wix-sign-dlls">
<param name="folder.to.sign" value="${light.dir}/native"/>
</antcall>
<mkdir dir="${light.dir}/sc-bundles" />
<copy todir="${light.dir}/sc-bundles" overwrite="true">
<fileset dir="${sc.basedir}/sc-bundles">
<include name="*.jar" />
<exclude name="*slick.jar" />
</fileset>
<fileset dir="${sc.basedir}/sc-bundles/os-specific/windows">
<include name="*.jar" />
<exclude name="*slick.jar" />
</fileset>
</copy>
<!--
Include a private Java Runtime Environment if it has been specified.
-->
<condition property="windows.jre.arch.zip.isset">
<and>
<isset property="windows.jre.arch.zip" />
<not>
<equals arg1="${windows.jre.arch.zip}" arg2="" />
</not>
</and>
</condition>
<antcall target="unzip-windows-jre">
<param name="unzip.windows.jre.src" value="${windows.jre.arch.zip}" />
<param name="unzip.windows.jre.dest" value="${light.dir}" />
</antcall>
<!-- Include any additional files if provided. -->
<copy todir="${light.dir}">
<fileset
casesensitive="false"
dir="${inst.resrc}/windows/installer-windows.wxs_FILES"
erroronmissingdir="false"
includes="**" />
</copy>
<!--
This update-location.properties file is the only of interest to the
MSI i.e. it gets installed on the user machine.
-->
<copy
file="${inst.resrc}/windows/update-location.properties"
todir="${light.dir}"
overwrite="true" />
<property name="wix.home" value="C:\Program Files\WiX" />
<!-- Execute heat.exe -->
<exec
executable="${wix.home}\heat.exe"
dir="${light.dir}"
failonerror="true">
<arg value="dir" />
<arg value="." />
<arg value="-nologo" />
<arg value="-ag" />
<arg value="-cg" />
<arg value="ComponentGroup_HeatExe" />
<arg value="-out" />
<arg value="${windows.app.dir}\tmp\heat.wxs" />
<arg value="-sfrag" />
<arg value="-suid" />
<!--
Suppress SelfReg because we do not have files that need it and
we do not want the private Java Runtime Environment to end up
registering such files.
-->
<arg value="-scom" />
<arg value="-sreg" />
<arg value="-svb6" />
<arg value="-var" />
<arg value="var.SourceDir" />
</exec>
<xslt
in="${windows.app.dir}/tmp/heat.wxs"
out="${windows.app.dir}/tmp/component-defines.wxi"
style="${inst.resrc}/windows/heat-component-defines.xsl" />
<xslt
in="${windows.app.dir}/tmp/heat.wxs"
out="${windows.app.dir}/tmp/component-refs.wxi"
style="${inst.resrc}/windows/heat-component-refs.xsl" />
<xslt
in="${windows.app.dir}/tmp/heat.wxs"
out="${windows.app.dir}/tmp/lib-dir-id.properties"
style="${inst.resrc}/windows/heat-component-libsearch.xsl" />
<property file="${windows.app.dir}/tmp/lib-dir-id.properties"/>
<copy
file="${inst.resrc}/windows/DefaultOverridesProps.wxi.template"
tofile="${windows.app.dir}/tmp/DefaultOverridesProps.wxi">
<globmapper from="*.wxi.template" to="*.wxi" />
<filterchain>
<tokenfilter>
<replacestring from="@@lib" to="${wix.heat.jitsi.lib.dir}" />
<replacestring from="@APP_NAME@" to="${application.name}" />
</tokenfilter>
</filterchain>
</copy>
<condition property="windows.is.64" value="yes" else="no">
<equals arg1="${windows.arch}" arg2="64" />
</condition>
<!--
Build cleansweep.exe because it is to be included in the setup by
candle.exe
-->
<exec
dir="${src}/native/windows/setup/cleansweep"
executable="make.exe"
failonerror="true">
<env key="PATH" path="${mingw.home}/bin;${env.PATH}" />
<arg value="PRODUCTNAME=${application.name}" />
<arg value="MINGW_HOME=${mingw.home}" />
<arg value="TARGET_DIR=${light.dir}" />
</exec>
<antcall target="wix-sign-file">
<param name="file.to.sign" value="${light.dir}/cleansweep.exe"/>
</antcall>
<delete>
<fileset dir="${light.dir}">
<include name="config.h" />
<include name="cleansweep.res" />
</fileset>
</delete>
<!-- prepare properties for executing candle.exe -->
<condition property="candle.var.Platform" value="x64" else="x86">
<equals arg1="${windows.arch}" arg2="64" />
</condition>
<condition
property="candle.arg.var.JRESetup"
value="-dJRESetup=${windows.jre.arch.file}"
else="-nologo">
<and>
<isset property="windows.jre.arch.file" />
<not>
<equals arg1="${windows.jre.arch.file}" arg2="" />
</not>
<not>
<isset property="windows.jre.arch.zip.isset" />
</not>
</and>
</condition>
<!-- should we create a separate msi target -->
<condition property="msi.var.store" value="true" else="false">
<equals arg1="${wix.store.msi}" arg2="true" />
</condition>
<antcall target="build-installation-wix-msi">
<param name="msi.var.compress" value="high"/>
</antcall>
<move
failonerror="false"
file="${windows.app.dir}/tmp/setup.msi"
preservelastmodified="true"
tofile="${windows.app.dir}\${windows.msi.package.name}" />
<!-- now build msi needed for the exe distribution without compression -->
<antcall target="build-installation-wix-msi">
<param name="msi.var.compress" value="none"/>
<param name="wix.store.msi" value="true"/>
</antcall>
<!-- Bootstrap the MSI into an EXE. -->
<exec
dir="${windows.app.dir}/tmp"
executable="${inst.resrc}/windows/xz.exe"
failonerror="true">
<arg value="-zk9ev" />
<arg value="setup.msi" />
</exec>
<exec
dir="${src}/native/windows/setup"
executable="make.exe"
failonerror="true">
<env key="PATH" path="${mingw.home}/bin;${env.PATH}" />
<arg value="MINGW_HOME=${mingw.home}" />
<arg value="TARGET_DIR=${windows.app.dir}/tmp" />
<arg value="PRODUCTBUILDVERSION=${sip-communicator.version}" />
</exec>
<antcall target="wix-sign-file">
<param name="file.to.sign" value="${windows.app.dir}\tmp\setup.exe"/>
</antcall>
<move
file="${windows.app.dir}/tmp/setup.exe"
preservelastmodified="true"
tofile="${windows.app.dir}\${windows.package.name}" />
<!-- before deleting try building the deltas -->
<antcall target="build-wix-delta-updates"/>
<!-- Creates updates files -->
<antcall target="build-wix-updates-files"/>
<delete dir="${light.dir}" />
<delete dir="${windows.app.dir}/tmp" />
</target>
<target name="build-installation-wix-msi" if="wix.store.msi">
<!-- if application publisher is not set use application name -->
<condition property="application.publisher"
value="${application.name}">
<not>
<isset property="application.publisher" />
</not>
</condition>
<!-- Finish the preparation for the execution of candle.exe -->
<filter token="APP_EMAIL" value="${application.email}" />
<filter token="APP_NAME" value="${application.name}" />
<filter token="APP_LAUNCHER_NAME" value="${wix.app.launcher.name}" />
<filter token="APP_WEB" value="${application.web}" />
<filter token="APP_PUBLISHER" value="${application.publisher}" />
<filter token="PRODUCTBUILDVERSION" value="${sip-communicator.version}" />
<filter token="WelcomeText1" value="${installer.welcome.wtext1}" />
<filter token="WelcomeText2" value="${installer.welcome.wtext2}" />
<filter token="WelcomeText3" value="${installer.welcome.wtext3}" />
<filter token="WINDOWS_IS_64" value="${windows.is.64}" />
<filter token="WIX_PRODUCT_ID" value="${wix.product.id}" />
<filter token="WIX_UPGRADE_CODE" value="${wix.upgrade.code}" />
<filter token="WIX_COMPRESS_LEVEL" value="${msi.var.compress}" />
<copy
todir="${windows.app.dir}/tmp"
overwrite="true"
filtering="yes">
<fileset dir="${inst.resrc}/windows">
<include name="*.wxl" />
<include name="installer-windows.wxs" />
<include name="SCRegistrySpec.wxi" />
<include name="windows_shortcut_specification.wxi" />
</fileset>
</copy>
<!-- Execute candle.exe -->
<exec
executable="${wix.home}\candle.exe"
dir="${windows.app.dir}/tmp"
failonerror="true">
<arg value="-nologo" />
<arg value="-dcodepage=1252" />
<arg value="-dPlatform=${candle.var.Platform}" />
<arg value="-ext" />
<arg value="WixUIExtension" />
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-dSourceDir=light" />
<arg value="${candle.arg.var.JRESetup}" />
<arg value="installer-windows.wxs" />
</exec>
<!-- Finish the preparation for the execution of light.exe -->
<copy todir="${light.dir}" overwrite="true">
<fileset dir="${inst.resrc}/doc">
<include name="License.rtf" />
</fileset>
<fileset dir="${inst.resrc}/windows">
<include name="wix-*.jpg" />
</fileset>
</copy>
<!-- Execute light.exe -->
<exec
executable="${wix.home}\light.exe"
dir="${light.dir}"
failonerror="true">
<arg value="-nologo" />
<arg value="-ext" />
<arg value="WixUIExtension" />
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-cultures:en-us" />
<arg value="-loc" />
<arg value="${windows.app.dir}\tmp\en-us.wxl" />
<arg value="-out" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="${windows.app.dir}\tmp\installer-windows.wixobj" />
</exec>
<!-- create transform files for the supported setup locales -->
<antcall target="build-installation-wix-locale">
<param name="locale.name" value="fr-fr"/>
<param name="locale.codepage" value="1252"/>
</antcall>
<!--antcall target="build-installation-wix-locale">
<property name="locale.name" value="bg-bg"/>
<property name="locale.codepage" value="1251"/>
</antcall-->
<!-- After we have created all transform files for all locales,
embed them into the setup msi one by one,
the last param is the LCID in order language to be
autoselected when msi is started
LCID info at:
http://msdn.microsoft.com/en-us/library/0h88fahh(v=vs.85).aspx
Note(2011-09-16 damencho):
every language added must be listed and in installer-windows.wxs
in the language attribute in Package and UpgradeVersion.
-->
<exec
executable="cscript.exe"
dir="${light.dir}"
failonerror="true">
<arg value="${inst.resrc}\windows\WiSubStg.vbs" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="${windows.app.dir}\tmp\fr-fr.mst" />
<arg value="1036" />
</exec>
<!--exec
executable="cscript.exe"
dir="${light.dir}"
failonerror="true">
<arg value="${inst.resrc}\windows\WiSubStg.vbs" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="${windows.app.dir}\tmp\bg-bg.mst" />
<arg value="1026" />
</exec-->
<antcall target="wix-sign-file">
<param name="file.to.sign" value="${windows.app.dir}\tmp\setup.msi"/>
</antcall>
</target>
<!-- Creates localized msi installers and the resulting
transform files-->
<target name="build-installation-wix-locale">
<!-- Execute candle.exe for locale.name-->
<exec
executable="${wix.home}\candle.exe"
dir="${windows.app.dir}/tmp"
failonerror="true">
<arg value="-nologo" />
<arg value="-dcodepage=${locale.codepage}" />
<arg value="-dPlatform=${candle.var.Platform}" />
<arg value="-ext" />
<arg value="WixUIExtension" />
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-dSourceDir=light" />
<arg value="${candle.arg.var.JRESetup}" />
<arg value="installer-windows.wxs" />
</exec>
<!-- Execute light.exe for locale.name -->
<exec
executable="${wix.home}\light.exe"
dir="${light.dir}"
failonerror="true">
<arg value="-nologo" />
<arg value="-ext" />
<arg value="WixUIExtension" />
<arg value="-ext" />
<arg value="WixUtilExtension" />
<arg value="-cultures:${locale.name}" />
<arg value="-loc" />
<arg value="${windows.app.dir}\tmp\${locale.name}.wxl" />
<arg value="-out" />
<arg value="${windows.app.dir}\tmp\setup_${locale.name}.msi" />
<arg value="${windows.app.dir}\tmp\installer-windows.wixobj" />
</exec>
<exec
executable="${wix.home}\torch.exe"
dir="${light.dir}"
failonerror="true">
<arg value="-p" />
<arg value="-t" />
<arg value="language" />
<arg value="${windows.app.dir}\tmp\setup.msi" />
<arg value="${windows.app.dir}\tmp\setup_${locale.name}.msi" />
<arg value="-out" />
<arg value="${windows.app.dir}\tmp\${locale.name}.mst" />
</exec>
</target>
<target name="build-wix-delta-updates"
if="delta.history.location"
depends="define-ant-contrib-task">
<!-- Find all previous builds we have to build deltas for them -->
<foreach param="build-location" target="-make-wix-delta"
inheritall="true" inheritrefs="true">
<path>
<dirset dir="${delta.history.location}">
<include name="*"/>
</dirset>
</path>
</foreach>
<!-- copy data for next delta builds-->
<mkdir dir="${delta.history.location}/${build.label}/${windows.arch}"/>
<copy file="${windows.app.dir}\tmp\setup.msi"
todir="${delta.history.location}/${build.label}/${windows.arch}"/>
<!-- now delete old one -->
<antcall target="-delete-oldest-delta-data"/>
</target>
<target name="-make-wix-delta">
<basename property="old.wix.build" file="${build-location}"/>
<!-- we must skip building deltas for current build
and if the source setup file is missing
-->
<condition property="process.delta">
<and>
<not>
<equals arg1="${old.wix.build}" arg2="${build.label}"/>
</not>
<available file="${build-location}\${windows.arch}\setup.msi"/>
</and>
</condition>
<antcall target="-make-wix-delta-msi"/>
</target>
<target name="-make-wix-delta-msi" if="process.delta">
<echo message="Creating msi delta for ${old.wix.build}-${build.label}"/>
<!-- make the actual diff -->
<exec executable="${inst.resrc}\windows\bsdiff.exe" failonerror="true">
<arg value="${build-location}\${windows.arch}\setup.msi"/>
<arg value="${windows.app.dir}\tmp\setup.msi"/>
<arg value="${windows.app.dir}\tmp\setup.bspatch"/>
</exec>
<exec
executable="cscript.exe"
dir="${light.dir}"
outputproperty="old.packagecode"
failonerror="true">
<arg value="//NoLogo" />
<arg value="${inst.resrc}\windows\WiSumInf.vbs" />
<arg value="${build-location}\${windows.arch}\setup.msi" />
</exec>
<echo message="Old package code is: ${old.packagecode}"/>
<length
file="${build-location}/${windows.arch}/setup.msi"
property="old.packagesize" />
<echo message="Old package size is: ${old.packagesize}"/>
<exec
dir="${src}/native/windows/setup"
executable="make.exe"
failonerror="true">
<env key="PATH" path="${mingw.home}/bin;${env.PATH}" />
<arg value="MINGW_HOME=${mingw.home}" />
<arg value="TARGET_DIR=${windows.app.dir}/tmp" />
<arg value="PACKAGECODE=${old.packagecode}" />
<arg value="PACKAGESIZE=${old.packagesize}" />
<arg value="PRODUCTBUILDVERSION=${sip-communicator.version}" />
</exec>
<antcall target="wix-sign-file">
<param name="file.to.sign" value="${windows.app.dir}\tmp\setup.exe"/>
</antcall>
<move
file="${windows.app.dir}/tmp/setup.exe"
preservelastmodified="true"
tofile="${windows.app.dir}\${package.name}-${sip-communicator.version}-delta-${old.wix.build}-${windows.package.name.suffix}" />
</target>
<target name="wix-sign-file" if="sign.cert.file">
<exec executable="${inst.resrc}/windows/signtool.exe"
failonerror="false">
<arg value="sign" />
<arg value="/d" />
<arg value="${application.name}" />
<arg value="/t" />
<arg value="http://tsa.starfieldtech.com" />
<arg value="/f" />
<arg value="${sign.cert.file}" />
<arg value="/p" />
<arg value="${sign.cert.password}" />
<arg value="${file.to.sign}" />
</exec>
</target>
<!-- signs all dll files in folder - $folder.to.sign
do it if $sign.cert.file is available -->
<target name="wix-sign-dlls" depends="define-ant-contrib-task">
<foreach param="file.to.sign" target="wix-sign-file"
inheritall="true" inheritrefs="true">
<path>
<fileset dir="${folder.to.sign}">
<include name="*.dll"/>
</fileset>
</path>
</foreach>
</target>
<!-- creates updates file, will be shown in dialog when update is
available -->
<target name="build-wix-updates-files">
<mkdir dir="${windows.app.dir}\updates"/>
<copy file="${inst.resrc}\windows\updates\sc.png"
todir="${windows.app.dir}\updates"/>
<copy file="${inst.resrc}\windows\updates\index-bottom.html"
todir="${windows.app.dir}\updates"/>
<copy file="${inst.resrc}\windows\updates\index.css"
todir="${windows.app.dir}\updates"/>
<tstamp>
<format property="current.tstamp" pattern="d MMM yyyy HH:mm:ss"
locale="en,US"/>
</tstamp>
<filter token="BUILD" value="${label}" />
<filter token="DATE" value="${current.tstamp}" />
<filter token="APP_NAME" value="${application.name}" />
<copy file="${inst.resrc}\windows\updates\index-top.html"
todir="${windows.app.dir}\updates"
overwrite="true" filtering="yes"/>
<get src="${link.update.changelog.prefix}/extended-changelog-${label}.html"
dest="changelog-${label}.html"
ignoreerrors="true"/>
<loadfile property="latest.changelog"
srcFile="changelog-${label}.html"
failonerror="false"/>
<!-- Load a default value if file with changelogs is missing -->
<condition property="latest.changelog" value="Nightly builds">
<not>
<isset property="latest.changelog"/>
</not>
</condition>
<concat destfile="${windows.app.dir}\updates\index.html">
<fileset dir="${windows.app.dir}\updates">
<include name="index-top.html"/>
</fileset>
<propertyset>
<propertyref name="latest.changelog"/>
</propertyset>
<fileset dir="${windows.app.dir}\updates">
<include name="index-bottom.html"/>
</fileset>
</concat>
<delete file="${windows.app.dir}\updates\index-top.html"/>
<delete file="${windows.app.dir}\updates\index-bottom.html"/>
<delete file="changelog-${label}.html"/>
</target>
<!-- - - - - - - - - - - BUILDING RELEASE PACKAGES - - - - - - - - - - - -->
<!-- Internal target called by the "clean target" - removes the macosx-specific file -->
<!-- we only execute if at least one (in this case the first) of the links we are
deleting exist as otherwise we see a bunch of warnings on every compile. -->
<available file="${macosx.resrc.dir}/logging.properties" property="macResourcesExist"/>
<target name="clean-macosx" if="macResourcesExist">
<delete failonerror="false" file="${macosx.resrc.dir}/jitsi-defaults.properties"/>
<delete failonerror="false" file="${macosx.resrc.dir}/logging.properties"/>
<delete failonerror="false" file="${macosx.resrc.dir}/felix.client.run.properties"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/libAEGetURLEventHandlerAgent.jnilib"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Headers"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Resources"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Growl"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Versions/Current"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Headers"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Resources"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Growl"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Versions/Current"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Headers"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources/fr_CA.lproj"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Sparkle"/>
<symlink action="delete" failonerror="false"
link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Versions/Current"/>
</target>
<target name="macosx" depends="version,load-properties,define-ant-contrib-task"
description="Create an .app package for MACOSX">
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"/>
<mkdir dir="${macosx.app.dir}"/>
<property name="macosx.stubfile"
value="${macosx.resrc.dir}/JavaApplicationStub"/>
<condition property="macosx.stubfile"
value="/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub">
<equals arg1="${os.name}"
arg2="Mac OS X"
casesensitive="false"
trim="true"/>
</condition>
<!-- We copy macosx-specific bundles from
sc-bundles/os-specific/macosx to sc-bundles -->
<copy todir="${bundles.dest}">
<fileset dir="${bundles.dest.mac}">
<include name="**/*.jar"/>
</fileset>
</copy>
<!-- Delete the old .app if it exists -->
<delete dir="${macosx.app.dir}/${application.name}.app"
quiet="yes" failonerror="false"/>
<!-- Delete the old tmp if it exists -->
<delete dir="${macosx.app.dir}/tmp"
quiet="yes" failonerror="false"/>
<mkdir dir="${macosx.app.dir}/tmp"/>
<!-- Sparkle needs the build number. If it is not
available, we use the normal build label -->
<condition property="sparkle.build"
value="${sparkle}"
else="${build.label}">
<isset property="sparkle"/>
</condition>
<condition property="jvmarg"
value="-client -Xmx256m"
else="" >
<os arch="i386" />
</condition>
<!-- removes any spaces from application name if any -->
<propertyregex property="macosx.stub.filename"
input="${application.name}"
regexp=" "
replace=""
override="true"
global="true"
defaultValue="${application.name}"/>
<copy file="${macosx.stubfile}"
tofile="${macosx.app.dir}/tmp/${macosx.stub.filename}"/>
<!-- This creates the .app for MacOSX -->
<jarbundler dir="${macosx.app.dir}"
name="${application.name}"
shortname="${application.name}"
signature="sipc"
mainclass="net.java.sip.communicator.launcher.SIPCommunicator"
icon="resources/images/logo/sc_logo_128x128.icns"
jvmversion="1.6*"
version="${sip-communicator.version}"
build="${sparkle.build}"
infostring="${application.name}"
bundleid="org.${package.name}"
stubfile="${macosx.app.dir}/tmp/${macosx.stub.filename}"
extraclasspath="/System/Library/Java,$JAVAROOT"
workingdirectory="$APP_PACKAGE/Contents/Resources/Java"
splashfile="$JAVAROOT/splash.gif"
vmoptions="-agentlib:AEGetURLEventHandlerAgent ${jvmarg}">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="apple.awt.brushMetalRounded" value="true"/>
<javaproperty name="apple.awt.showGrowBox" value="true"/>
<javaproperty name="java.library.path"
value="$JAVAROOT/lib/native/mac:${system.DYLD_LIBRARY_PATH}"/>
<javaproperty name="jna.library.path"
value="$JAVAROOT/lib/native/mac:${system.DYLD_LIBRARY_PATH}"/>
<javaproperty name="net.java.sip.communicator.SC_HOME_DIR_NAME"
value="${application.name}"/>
<!-- Tell felix to run sip-communicator -->
<javaproperty name="felix.config.properties"
value="file:felix.client.run.properties"/>
<!-- Tell java.util.logging about our logging preferences -->
<javaproperty name="java.util.logging.config.file"
value="logging.properties"/>
<jarfileset dir=".">
<include name="lib/*.jar" />
<include name="lib/os-specific/mac/*.jar" />
<include name="lib/bundle/*.jar" />
<exclude name="lib/bundle/junit.jar" />
<include name="lib/native/mac/*.jnilib" />
<include name="lib/native/mac/*.dylib" />
<exclude name="lib/native/mac/libgrowl4j.dylib" />
<exclude name="lib/native/mac/libsparkle_init.dylib" />
<include name="${bundles.dest}/*.jar" />
<exclude name="${bundles.dest}/*-slick.jar" />
<exclude name="${bundles.dest}/sparkle.jar" />
<exclude name="${bundles.dest}/update.jar" />
<include name="resources/images/logo/sc_logo_128x128.icns" />
</jarfileset>
<javafilelist dir="${inst.resrc}"
files="logging.properties"/>
<javafilelist dir="${lib}"
files="felix.client.run.properties"/>
<javafilelist dir="${lib}"
files="jitsi-defaults.properties"/>
<javafilelist dir="${lib}"
files="jitsi-default-overrides.properties"/>
</jarbundler>
<!-- -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
token="swingnotification.jar">
<replacevalue><![CDATA[swingnotification.jar reference\:file\:sc-bundles/growlnotification.jar]]></replacevalue>
</replace>
<!-- Remove the reference to the update bundle -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
token="reference:file:sc-bundles/update.jar"
value=""/>
<!-- colons can be escaped after some modifications -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
token="reference\:file\:sc-bundles/update.jar"
value=""/>
<replaceregexp file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
match="^org.osgi.framework.storage=\$\{user.home\}/.sip-communicator/sip-communicator.bin"
replace="org.osgi.framework.storage=$\{user.home\}/Library/Application Support/${application.name}/sip-communicator.bin"
flags="m"/>
<!-- Install the Growl Framework in the application package -->
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
<unzip src="${macosx.resrc.dir}/GrowlFramework.zip"
dest="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
<!-- Ant unzip tasks does not preserve symlinks, so we recreate them -->
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Versions/Current"
resource="./A"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Headers"
resource="./Versions/Current/Headers"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Resources"
resource="./Versions/Current/Resources"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Growl.framework/Growl"
resource="./Versions/Current/Growl"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Versions/Current"
resource="./A"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Headers"
resource="./Versions/Current/Headers"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Resources"
resource="./Versions/Current/Resources"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/GrowlFramework/Legacy/Growl.framework/Growl"
resource="./Versions/Current/Growl"/>
<!-- Add the url types in the Info.plist file -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacetoken><![CDATA[<key>CFBundleName</key>]]></replacetoken>
<replacevalue><![CDATA[<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>sip URI</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sip</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>xmpp URI</string>
<key>CFBundleURLSchemes</key>
<array>
<string>xmpp</string>
</array>
</dict>
</array>
<key>CFBundleName</key>]]></replacevalue>
</replace>
<!-- Add property for high resolution displays -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacetoken><![CDATA[<key>CFBundleName</key>]]></replacetoken>
<replacevalue><![CDATA[<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundleName</key>]]></replacevalue>
</replace>
<symlink resource="lib/native/mac/libAEGetURLEventHandlerAgent.jnilib"
link="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/libAEGetURLEventHandlerAgent.jnilib"/>
<symlink resource="lib/native/mac/libAEGetURLEventHandlerAgent.jnilib"
link="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/libAEGetURLEventHandlerAgent.dylib"/>
<symlink resource="libAEGetURLEventHandlerAgent.jnilib"
link="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/lib/native/mac/libAEGetURLEventHandlerAgent.dylib"/>
<copy file="${macosx.resrc.dir}/libgrowl4j.dylib"
todir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/lib/native/mac/"/>
<antcall target="-macosx-include-jre"/>
<antcall target="enable-splash">
<param name="target.dir"
value="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java"/>
</antcall>
<!-- Delete the tmp if it exists -->
<delete dir="${macosx.app.dir}/tmp"
quiet="yes" failonerror="false"/>
</target>
<!-- if folder for a macosx jdk is supplied we embed it in the distributed
dmg and provide info for it in Info.plist -->
<target name="-macosx-include-jre"
if="macosx.jre"
unless="macosx.embed.jre.disabled">
<basename property="jre.folder.name" file="${macosx.jre}"/>
<dirname property="jre.parent.folder" file="${macosx.jre}"/>
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/PlugIns"/>
<copy todir="${macosx.app.dir}/${application.name}.app/Contents/PlugIns">
<fileset dir="${jre.parent.folder}">
<include name="${jre.folder.name}/Contents/Info.plist"/>
<include name="${jre.folder.name}/Contents/Home/jre/"/>
<exclude name="${jre.folder.name}/Contents/Home/bin/"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/bin/"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/deploy/"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/deploy.jar"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/javaws.jar"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/libdeploy.dylib"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/libnpjp2.dylib"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/plugin.jar"/>
<exclude name="${jre.folder.name}/Contents/Home/jre/lib/security/javaws.policy"/>
</fileset>
</copy>
<!-- and now the entry in Info.plist-->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacetoken><![CDATA[<key>VMOptions</key>]]></replacetoken>
<replacevalue><![CDATA[<key>JVMRuntime</key>
<string>__jre.folder.name__</string>
<key>VMOptions</key>]]></replacevalue>
</replace>
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacefilter token="__jre.folder.name__" value="${jre.folder.name}"/>
</replace>
</target>
<!-- Create a MacOSX application package with Sparkle support.
Executed only if the sparkle label property is set, i.e. if the
package is built from CruiseControl -->
<target name="macosx-sparkle" depends="macosx"
if="sparkle"
description="Create an .app package for MACOSX with Sparkle support">
<!-- Add the sparkle bundle path in the felix.client.run.properties file -->
<echo file="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/felix.client.run.properties"
append="true">felix.auto.start.71= reference:file:sc-bundles/sparkle.jar
</echo>
<!-- Add the Sparkle bundle and JNI to the application package -->
<copy file="${bundles.dest}/sparkle.jar"
todir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/sc-bundles/"/>
<copy file="lib/native/mac/libsparkle_init.dylib"
todir="${macosx.app.dir}/${application.name}.app/Contents/Resources/Java/lib/native/mac/"/>
<!-- Add public key file to the application bundle -->
<copy file="${macosx.resrc.dir}/sparkle_dsa_pub.pem"
todir="${macosx.app.dir}/${application.name}.app/Contents/Resources/"/>
<!-- Add the Sparkle properties in the Info.plist file -->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacetoken><![CDATA[<key>CFBundleName</key>]]></replacetoken>
<replacevalue><![CDATA[<key>SUCheckAtStartup</key>
<string>YES</string>
<key>SUScheduledCheckInterval</key>
<string>86400</string>
<key>SUPublicDSAKeyFile</key>
<string>sparkle_dsa_pub.pem</string>
<key>SUFeedURL</key>
<string>_DOWNLOAD_LINK_</string>
<key>SUShowReleaseNotes</key>
<string>YES</string>
<key>CFBundleName</key>]]></replacevalue>
</replace>
<!-- Now replace the download link-->
<replace file="${macosx.app.dir}/${application.name}.app/Contents/Info.plist">
<replacefilter token="_DOWNLOAD_LINK_" value="${link.updates.macosx}"/>
</replace>
<!-- Install the Sparkle Framework in the application package -->
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
<unzip src="${macosx.resrc.dir}/Sparkle.framework.zip"
dest="${macosx.app.dir}/${application.name}.app/Contents/Frameworks"/>
<!-- Ant unzip tasks does not preserve symlinks, so we recreate them -->
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Versions/Current"
resource="./A"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Headers"
resource="./Versions/Current/Headers"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources"
resource="./Versions/Current/Resources"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Sparkle"
resource="./Versions/Current/Sparkle"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources/fr_CA.lproj"
resource="./fr.lproj"/>
<symlink link="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources/pt.lproj"
resource="./pt_BR.lproj" failonerror="false"/>
<!-- Restore the file permissions to the Sparke relaunch tool -->
<chmod file="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Resources/relaunch"
perm="ugo+rx"/>
<chmod file="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Versions/A/Sparkle"
perm="ugo+rx"/>
<chmod file="${macosx.app.dir}/${application.name}.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/MacOS/finish_installation"
perm="ugo+rx"/>
</target>
<!-- Creates empty folders in Contents/Resources for
available languages, so macosx can switch languages -->
<target name="dmg-create-language-folders"
depends="define-ant-contrib-task">
<foreach param="file.language.resource" target="dmg-language-folder"
inheritall="true" inheritrefs="true">
<path>
<fileset dir="${sc.basedir}/resources/languages">
<include name="*.properties"/>
</fileset>
</path>
</foreach>
</target>
<target name="dmg-language-folder">
<propertyregex property="jitsi.available.lang.resource"
input="${file.language.resource}"
regexp="resources_(.*)\.properties"
select="\1"
casesensitive="false"
defaultValue="en"/>
<mkdir dir="${macosx.app.dir}/${application.name}.app/Contents/Resources/${jitsi.available.lang.resource}.lproj"/>
</target>
<!-- Create the DMG - This only works on MacOSX (need hdiutil) -->
<target name="dmg" depends="macosx-sparkle"
if="is.running.macos"
description="Create a .dmg package for MACOSX (only works on MACOSX)">
<property name="macosx.dmg.name"
value="${package.name}-${sip-communicator.version}.dmg"/>
<property name="macosx.dmg.tmpname"
value="${package.name}-tmp.dmg"/>
<delete file="${macosx.app.dir}/${macosx.dmg.name}"
quiet="yes" failonerror="false"/>
<!-- Creates empty folders in Contents/Resources for
available languages, so macosx can switch languages -->
<antcall target="dmg-create-language-folders" />
<!-- sign before creating the image, so the signed app goes into it -->
<antcall target="macosx-sign-app"/>
<!-- Create a temporary Disk Image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="${macosx.app.dir}/${application.name}.app"/>
<arg value="-volname"/>
<arg value="${application.name}"/>
<arg value="-ov"/>
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
<arg value="-format"/>
<arg value="UDRW"/>
</exec>
<!-- Attach the temporary image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="attach"/>
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
<arg value="-mountroot"/>
<arg value="${release}/"/>
</exec>
<!-- Copy the background, icon and DS_Store files -->
<mkdir dir="${release}/${application.name}/.background"/>
<copy file="${macosx.resrc.dir}/dmg-background.png"
tofile="${release}/${application.name}/.background/background.png"
overwrite="true"/>
<copy file="${macosx.resrc.dir}/dmg-VolumeIcon.icns"
tofile="${release}/${application.name}/.VolumeIcon.icns"
overwrite="true"/>
<copy file="${macosx.resrc.dir}/dmg-DS_Store"
tofile="${release}/${application.name}/.DS_Store"
overwrite="true"/>
<exec executable="/Developer/Tools/SetFile" os="Mac OS X">
<arg value="-a"/>
<arg value="C"/>
<arg value="${release}/${application.name}"/>
</exec>
<!-- Add a symbolic link to the Applications directory -->
<symlink link="${release}/${application.name}" resource="/Applications"/>
<!-- Detach the temporary image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="detach"/>
<arg value="${release}/${application.name}"/>
</exec>
<!-- Compress it to a new image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="convert"/>
<arg value="${macosx.app.dir}/${macosx.dmg.tmpname}"/>
<arg value="-format"/>
<arg value="UDZO"/>
<arg value="-o"/>
<arg value="${macosx.app.dir}/${macosx.dmg.name}"/>
</exec>
<!-- Delete the temporary image -->
<delete file="${macosx.app.dir}/${macosx.dmg.tmpname}"
quiet="yes" failonerror="false"/>
<!-- creates the sparkle xmls -->
<antcall target="macosx-sparkle-files"/>
<antcall target="macosx-sparkle-delta-updates"/>
<antcall target="macosx-sparkle-files-finish"/>
<!-- remove folder we are done -->
<delete dir="${macosx.app.dir}/${application.name}.app"
quiet="yes" failonerror="false"/>
</target>
<!--
If there is a property enabling the keychain name
we can sign.
-->
<target name="macosx-sign-app" if="macosx.sign.keychain">
<echo message="Signing application!"/>
<!-- unlocking the keychain -->
<exec executable="/usr/bin/security" os="Mac OS X" failonerror="true">
<arg value="unlock-keychain"/>
<arg value="-p"/>
<arg value=""/>
<arg value="${macosx.sign.keychain}"/>
</exec>
<!-- signing -->
<exec executable="/usr/bin/codesign" os="Mac OS X" failonerror="true">
<arg value="-s"/>
<arg value="${macosx.sign.certid}"/>
<arg value="--keychain"/>
<arg value="${macosx.sign.keychain}"/>
<arg value="--requirements"/>
<!-- the designated param value is taken after executing the command
on already installed and signed application
$ codesign -d -r- /Applications/Jitsi.app -->
<arg value="=designated => identifier &quot;org.${package.name}&quot; and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = &quot;BE8738ZVRM&quot;"/>
<arg value="${macosx.app.dir}/${application.name}.app"/>
</exec>
<!-- just print sign info
To test is sign accepted do $ sudo spctl -a -v -->
<exec executable="/usr/bin/codesign" os="Mac OS X" failonerror="true">
<arg value="-dvvv"/>
<arg value="${macosx.app.dir}/${application.name}.app"/>
</exec>
<!-- locking again -->
<exec executable="/usr/bin/security" os="Mac OS X" failonerror="true">
<arg value="lock-keychain"/>
<arg value="${macosx.sign.keychain}"/>
</exec>
</target>
<!-- a set of targets to load the properties needed to execute
just macosx-sparkle-files and macosx-sparkle-files-finish to
re-generate files if we accidentally delete them :)
-->
<target name="macosx-sparkle-params"
depends="version-params,load-props-params">
<property name="macosx.dmg.name"
value="${package.name}-${sip-communicator.version}.dmg"/>
</target>
<target name="version-params"
unless="sip-communicator.version">
<ant target="version"/>
</target>
<target name="load-props-params"
unless="sparkle.signiture.location">
<ant target="load-properties"/>
</target>
<!-- -->
<target name="macosx-sparkle-files"
depends="macosx-sparkle-params"
if="sparkle.signiture.location">
<exec executable="bash" os="Mac OS X" failonerror="true"
outputproperty="signature.base64">
<arg value="-c"/>
<arg value="openssl dgst -sha1 -binary &lt; '${macosx.app.dir}/${macosx.dmg.name}' | openssl dgst -dss1 -sign ${sparkle.signiture.location} | openssl enc -base64"/>
</exec>
<length file="${macosx.app.dir}/${macosx.dmg.name}"
property="dmg.file.length" />
<copy todir="${macosx.app.dir}/sparkle">
<fileset dir="${macosx.resrc.dir}/sparkle-files/sparkle"/>
</copy>
<tstamp>
<format property="current.tstamp" pattern="d MMM yyyy HH:mm:ss"
locale="en,US"/>
</tstamp>
<filter token="BUILD" value="${sparkle.build}" />
<filter token="DATE" value="${current.tstamp}" />
<filter token="APP_NAME" value="${application.name}" />
<filter token="SPARKLE_UPDATES" value="${link.updates.macosx}" />
<filter token="SPARKLE_INDEX" value="${link.sparkle.updates.index}" />
<filter token="LEN" value="${dmg.file.length}" />
<filter token="SIGNATURE" value="${signature.base64}" />
<filter token="DOWNLOAD_DMG_LINK" value="${link.download.macosx}" />
<copy file="${macosx.resrc.dir}/sparkle-files/updates.xml"
tofile="${macosx.app.dir}/sparkle/updates-tmp.xml"
overwrite="true" filtering="yes"/>
<copy file="${macosx.resrc.dir}/sparkle-files/index-top.html"
todir="${macosx.app.dir}/sparkle"
overwrite="true" filtering="yes"/>
<get src="${link.update.changelog.prefix}/extended-changelog-${label}.html"
dest="changelog-${label}.html"
ignoreerrors="true"/>
<loadfile property="latest.changelog"
srcFile="changelog-${label}.html"
failonerror="false"/>
<!-- Load a default value if file with changelogs is missing -->
<condition property="latest.changelog" value="Nightly builds">
<not>
<isset property="latest.changelog"/>
</not>
</condition>
<concat destfile="${macosx.app.dir}/sparkle/index.html">
<fileset dir="${macosx.app.dir}/sparkle/">
<include name="index-top.html"/>
</fileset>
<propertyset>
<propertyref name="latest.changelog"/>
</propertyset>
<fileset dir="${macosx.resrc.dir}/sparkle-files">
<include name="index-bottom.html"/>
</fileset>
</concat>
<delete file="${macosx.app.dir}/sparkle/index-top.html"/>
<delete file="changelog-${label}.html"/>
</target>
<!-- task only finishes generating sparkle files if needed -->
<target name="macosx-sparkle-files-finish"
depends="macosx-sparkle-params"
if="sparkle.signiture.location">
<!-- To be able to insert deltas in the updates xml
we use the token @SPARKLE_DELTAS@. And when finished
puting deltas (no matter if there were any at all if option
is not enabled) we must remove the SPARKLE_DELTAS token if left.
-->
<filter token="SPARKLE_DELTAS" value="" />
<move file="${macosx.app.dir}/sparkle/updates-tmp.xml"
tofile="${macosx.app.dir}/sparkle/updates.xml"
overwrite="true" filtering="yes"/>
</target>
<target name="macosx-sparkle-delta-updates"
if="delta.history.location"
depends="define-ant-contrib-task">
<!-- create temp dir for making delta diffs -->
<mkdir dir="${macosx.app.dir}/tmp"/>
<!-- Attach the current image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="attach"/>
<arg value="${macosx.app.dir}/${macosx.dmg.name}"/>
<arg value="-mountroot"/>
<arg value="${macosx.app.dir}/tmp/"/>
</exec>
<unzip src="${macosx.resrc.dir}/Sparkle.framework.zip"
dest="${macosx.app.dir}/tmp"/>
<copy file="${macosx.resrc.dir}/BinaryDelta"
todir="${macosx.app.dir}/tmp"/>
<chmod file="${macosx.app.dir}/tmp/BinaryDelta"
perm="ugo+rx"/>
<!-- Find all previous builds we have to build deltas for them -->
<foreach param="build-location" target="-make-sparkle-pre-delta"
inheritall="true" inheritrefs="true">
<path>
<dirset dir="${delta.history.location}">
<include name="*"/>
</dirset>
</path>
</foreach>
<!-- Detach the temporary image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="detach"/>
<arg value="${macosx.app.dir}/tmp/${application.name}"/>
</exec>
<!-- delete the temp dir -->
<delete dir="${macosx.app.dir}/tmp"/>
<!-- copy data for next delta builds-->
<mkdir dir="${delta.history.location}/${sparkle.build}"/>
<copy file="${macosx.app.dir}/${macosx.dmg.name}"
tofile="${delta.history.location}/${sparkle.build}/${package.name}.dmg"
overwrite="true"/>
<!-- now delete old one -->
<antcall target="-delete-oldest-delta-data"/>
</target>
<!-- just checks if current build is the same number as the history build
so we do not build delta against the same build -->
<target name="-make-sparkle-pre-delta">
<basename property="old.sparkle.build" file="${build-location}"/>
<!-- we must skip building deltas for current build
and if the source setup file is missing
-->
<condition property="process.delta">
<and>
<not>
<equals arg1="${old.sparkle.build}" arg2="${build.label}"/>
</not>
<available file="${build-location}\${package.name}.dmg"/>
</and>
</condition>
<antcall target="-make-sparkle-delta"/>
</target>
<target name="-make-sparkle-delta"
if="process.delta">
<basename property="old.sparkle.build" file="${build-location}"/>
<echo message="Creating dmg delta for ${old.sparkle.build}-${sparkle.build}"/>
<!-- create temp dir for making delta diffs -->
<mkdir dir="${macosx.app.dir}/tmp/${old.sparkle.build}"/>
<!-- Attach the image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="attach"/>
<arg value="${build-location}/${package.name}.dmg"/>
<arg value="-mountroot"/>
<arg value="${macosx.app.dir}/tmp/${old.sparkle.build}/"/>
</exec>
<!-- make the actual diff -->
<exec executable="${macosx.app.dir}/tmp/BinaryDelta"
os="Mac OS X" failonerror="true">
<arg value="create"/>
<arg value="${macosx.app.dir}/tmp/${old.sparkle.build}/${application.name}/${application.name}.app"/>
<arg value="${macosx.app.dir}/tmp/${application.name}/${application.name}.app"/>
<arg value="${macosx.app.dir}/${application.name}-${old.sparkle.build}-to-${sparkle.build}.delta"/>
</exec>
<!-- Detach the temporary image -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X" failonerror="true">
<arg value="detach"/>
<arg value="${macosx.app.dir}/tmp/${old.sparkle.build}/${application.name}"/>
</exec>
<!-- delete the temp dir -->
<delete dir="${macosx.app.dir}/tmp/${old.sparkle.build}"/>
<exec executable="bash" os="Mac OS X" failonerror="true"
outputproperty="delta.signature.base64">
<arg value="-c"/>
<arg value="openssl dgst -sha1 -binary &lt; '${macosx.app.dir}/${application.name}-${old.sparkle.build}-to-${sparkle.build}.delta' | openssl dgst -dss1 -sign ${sparkle.signiture.location} | openssl enc -base64"/>
</exec>
<length file="${macosx.app.dir}/${application.name}-${old.sparkle.build}-to-${sparkle.build}.delta"
property="delta.file.length" />
<copy file="${macosx.app.dir}/sparkle/updates-tmp.xml"
tofile="${macosx.app.dir}/sparkle/updates-tmp1.xml"/>
<move file="${macosx.app.dir}/sparkle/updates-tmp1.xml"
tofile="${macosx.app.dir}/sparkle/updates-tmp.xml"
overwrite="true" filtering="yes">
<filterset recurse="false">
<filter token="SPARKLE_DELTAS" value="
&lt;enclosure type=&quot;application/octet-stream&quot;
sparkle:version=&quot;${sparkle.build}&quot; length=&quot;${delta.file.length}&quot;
sparkle:dsaSignature=&quot;${delta.signature.base64}&quot;
sparkle:deltaFrom=&quot;${old.sparkle.build}&quot;
url=&quot;${sparkle.delta.download.location}/${application.name}-${old.sparkle.build}-to-${sparkle.build}.delta&quot;/&gt;
@SPARKLE_DELTAS@
" />
</filterset>
</move>
</target>
<!-- Copies the splash to the ${target.dir} folder -->
<target name="enable-splash"
if="splashscreen.enable">
<copy file="${inst.resrc}/resources/splash.gif" todir="${target.dir}"/>
</target>
<target name="-delete-oldest-delta-data">
<resourcecount property="build.history.current.size">
<dirset dir="${delta.history.location}">
<include name="*"/>
</dirset>
</resourcecount>
<math result="build.history.to.delete"
operand1="${build.history.current.size}"
operation="-"
operand2="${delta.history.size}"
datatype="int"/>
<timestampselector outputsetid="oldest.builds"
count="${build.history.to.delete}"
age="eldest">
<path>
<dirset dir="${delta.history.location}">
<include name="*" />
</dirset>
</path>
</timestampselector>
<foreach param="build.to.delete"
target="-delete-oldest-delta-data-folder">
<path refid="oldest.builds"/>
</foreach>
</target>
<target name="-delete-oldest-delta-data-folder">
<echo message="!!! Deleting old data dir ${build.to.delete} !!! " />
<delete dir="${build.to.delete}" failonerror="false"/>
</target>
<!-- Outputs a warning notifying the user that a dpkg tool is missing. -->
<target name="dpkg-build-warning" unless="dpkg.build.present">
<echo message="Either the ${dpkg-buildpackage} tool or the debhelper tools was not found on your system."/>
<echo message="Try installing the 'dpkg-dev' and 'debhelper' packages"/>
</target>
<!-- Create a Debian package - This needs dpkg utilities
The target uses the existing jni binaries
For cross compiling i386 on amd64
ln -s /usr/bin/strip /usr/bin/i486-linux-gnu-strip
ln -s /usr/bin/objdump /usr/bin/i486-linux-gnu-objdump
dpkg-cross
dpkg -add-architecture i386 (the option is with two dashes!)
apt-get update
apt-get install libc6:i386 libpulse0:i386 libx11-6:i386 libxv1:i386 libstdc++6:i386 libasound2:i386
-->
<target name="-make-deb-package" depends="init,version,load-properties,dpkg-build-warning"
if="dpkg.build.present"
description="Create a .deb package for Debian (needs dpkg utilities)">
<!-- create jitsi copy to work on it -->
<property name="debian.target.dir"
value="${debian.tmp.dir}/${package.name}" />
<mkdir dir="${debian.target.dir}"/>
<antcall target="deb-copy-jitsi">
<param name="target.dir" value="${debian.target.dir}"/>
</antcall>
<antcall target="deb-copy-jitsi-libs">
<param name="target.dir" value="${debian.target.dir}"/>
</antcall>
<property name="debianize.dir" value="${debian.target.dir}/debian" />
<!-- the target we will use to build the package,
depends whether we are building source package or just a deb -->
<property name="debianize.build.target" value="make-and-deploy" />
<antcall target="dpkg-debianize" />
<!-- Build binary .deb package -->
<exec executable="${dpkg-buildpackage}" dir="${debian.target.dir}">
<arg value="-tc"/>
<arg value="-us"/>
<arg value="-uc"/>
<arg value="-b"/>
<arg value="-d"/>
<arg value="-a${deb-arch}"/>
</exec>
<move todir="${debian.dir}">
<fileset dir="${debian.tmp.dir}">
<include name="${package.name}*"/>
<!-- exclude the source folder -->
<exclude name="${package.name}"/>
</fileset>
</move>
<!--
Copy changelogs before deleting them, these changelogs are used by
tools like Update Manager in Ubuntu distribution. -->
<copy file="${debianize.dir}/changelog"
tofile="${debian.dir}/${package.name}_${sip-communicator.version}_${deb-arch}.changelog"/>
<delete dir="${debian.tmp.dir}"/>
</target>
<target name="deb-32">
<antcall target="-make-deb-package">
<param name="deb-arch" value="i386"/>
</antcall>
</target>
<target name="deb-64">
<antcall target="-make-deb-package">
<param name="deb-arch" value="amd64"/>
</antcall>
</target>
<target name="deb" depends="deb-32,deb-64"/>
<!-- Outputs a warning notifying the user that dpkg-scanpackages is not installed. -->
<target name="dpkg-scan-warning" unless="dpkg.scan.present">
<echo message="The ${dpkg-scanpackages} tool was not found on your system."/>
<echo message="Try installing the 'dpkg-dev' package "/>
</target>
<!-- Uses the templates to create necessary files for debian folder
uses debianize.dir as destination folder
used from deb-src and deb target. If property debianize.src.pkg is set
means the target is used by deb-src, if not it is the deb target
that is calling us.
-->
<target name="dpkg-debianize" depends="define-ant-contrib-task">
<mkdir dir="${debianize.dir}"/>
<mkdir dir="${debianize.dir}/../lib"/>
<mkdir dir="${debianize.dir}/sh"/>
<!-- Prepare felix.client.run.properties and put some specific bundles -->
<copy file="${lib}/felix.client.run.properties"
tofile="${debianize.dir}/../lib/felix.client.run.properties"
overwrite="true"/>
<replace file="${debianize.dir}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/swingnotification.jar \">
<replacevalue><![CDATA[reference:file:sc-bundles/galagonotification.jar \
reference:file:sc-bundles/swingnotification.jar \]]></replacevalue>
</replace>
<replace file="${debianize.dir}/../lib/felix.client.run.properties"
token=" reference:file:lib/bundle/org.apache.felix.bundlerepository-1.6.4.jar">
<replacevalue></replacevalue>
</replace>
<replace file="${debianize.dir}/../lib/felix.client.run.properties"
token=" reference:file:sc-bundles/os-specific/macosx/growlnotification.jar \${line.separator}">
<replacevalue></replacevalue>
</replace>
<antcall target="-deb-felix.client.run-for-src"/>
<copy file="${lib}/jitsi-defaults.properties"
tofile="${debianize.dir}/../lib/jitsi-defaults.properties"
overwrite="true"
failonerror="false"/>
<!-- Put correct version in the sip-communicator executable file -->
<copy file="${inst.resrc}/debian/jitsi.sh.tmpl"
tofile="${debianize.dir}/sh/${package.name}"
overwrite="true"/>
<replace file="${debianize.dir}/sh/${package.name}"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<antcall target="-deb-sh-update-homedir"/>
<!-- only if called from deb target -->
<antcall target="-deb-sh-file-update"/>
<!-- Prepare the changelog file -->
<copy file="${inst.resrc}/debian/changelog.tmpl"
tofile="${debianize.dir}/changelog"
overwrite="true"/>
<replace file="${debianize.dir}/changelog"
token="_VERSION_"
value="${sip-communicator.version}-1"/>
<replace file="${debianize.dir}/changelog"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<get src="${link.update.changelog.prefix}/extended-changelog-${label}.txt"
dest="changelog-${label}.txt" ignoreerrors="true"/>
<loadfile property="latest.changelog"
srcFile="changelog-${label}.txt" failonerror="false"/>
<!-- Load a default value if file with changelogs is missing -->
<condition property="latest.changelog" value="Nightly builds">
<not>
<isset property="latest.changelog"/>
</not>
</condition>
<replace file="${debianize.dir}/changelog"
token="_CHANGES_"
value="${latest.changelog}"/>
<delete file="changelog-${label}.txt"/>
<!-- Prepare the control file -->
<antcall target="-deb-control-file"/>
<!-- Prepare the rules file -->
<copy file="${inst.resrc}/debian/rules.tmpl"
tofile="${debianize.dir}/rules"
overwrite="true"/>
<!-- makes some checks for custom set targets and sets build target -->
<antcall target="-deb-build-target-replace"/>
<replace file="${debianize.dir}/rules"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<chmod file="${debianize.dir}/rules" perm="+x"/>
<!-- update the rules file if invoked from within deb target -->
<antcall target="-deb-rules-file-update"/>
<copy file="${inst.resrc}/debian/package.install.tmpl"
tofile="${debianize.dir}/${package.name}.install"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.install"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<available property="jitsi-default-overrides.exists"
file="${lib}/jitsi-default-overrides.properties"/>
<antcall target="-deb-manage-jitsi-default-overrides"/>
<!-- change the package.install file if used from deb target -->
<antcall target="-deb-package.install-file-update"/>
<!-- copies links file only if used in the context of deb-src target -->
<antcall target="-deb-links-file"/>
<copy file="${inst.resrc}/debian/README.embedded-libraries"
tofile="${debianize.dir}/README.embedded-libraries"
overwrite="true"/>
<!-- Prepare man page file -->
<copy file="${inst.resrc}/debian/jitsi.1.tmpl"
tofile="${debianize.dir}/${package.name}.1"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.1"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<replace file="${debianize.dir}/${package.name}.1"
token="_APP_NAME_"
value="${application.name}"/>
<copy file="${inst.resrc}/debian/package.manpages.tmpl"
tofile="${debianize.dir}/${package.name}.manpages"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.manpages"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<!-- Prepare debian shortcuts -->
<copy file="${inst.resrc}/debian/jitsi.desktop.tmpl"
tofile="${debianize.dir}/${package.name}.desktop"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.desktop"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<replace file="${debianize.dir}/${package.name}.desktop"
token="_APP_NAME_"
value="${application.name}"/>
<copy file="${inst.resrc}/debian/jitsi.menu.tmpl"
tofile="${debianize.dir}/${package.name}.menu"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.menu"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<replace file="${debianize.dir}/${package.name}.menu"
token="_APP_NAME_"
value="${application.name}"/>
<!-- Prepare icon files -->
<copy file="${inst.resrc}/debian/jitsi-16.xpm"
tofile="${debianize.dir}/${package.name}-16.xpm"
overwrite="true"/>
<copy file="${inst.resrc}/debian/jitsi-32.xpm"
tofile="${debianize.dir}/${package.name}-32.xpm"
overwrite="true"/>
<copy file="${inst.resrc}/debian/jitsi.svg"
tofile="${debianize.dir}/${package.name}.svg"
overwrite="true"/>
<!-- Put the current date in the changelog -->
<tstamp>
<format property="date"
pattern="EEE, d MMM yyyy HH:mm:ss Z"
locale="en,US"/>
</tstamp>
<replace file="${debianize.dir}/changelog"
token="_DATE_"
value="${date}"/>
<copy file="${inst.resrc}/debian/compat"
todir="${debianize.dir}"
overwrite="true"/>
<copy file="${inst.resrc}/debian/copyright"
todir="${debianize.dir}"
overwrite="true"/>
<copy file="${inst.resrc}/debian/watch"
todir="${debianize.dir}"
overwrite="true"/>
<!-- use postinst and postrm files only if used from deb target -->
<antcall target="-deb-post-files-update"/>
<copy todir="${debianize.dir}/source">
<fileset dir="${inst.resrc}/debian/source"/>
</copy>
<copy todir="${debianize.dir}/patches">
<fileset dir="${inst.resrc}/debian/patches"/>
</copy>
</target>
<target name="-deb-felix.client.run-for-src"
if="debianize.src.pkg">
<replace file="${debianize.dir}/../lib/felix.client.run.properties"
token=" reference:file:sc-bundles/httpclient.jar \${line.separator}">
<replacevalue> reference:file:sc-bundles/httpclient.jar \
reference:file:sc-bundles/httpmime.jar \
</replacevalue>
</replace>
</target>
<target name="-deb-manage-jitsi-default-overrides"
if="${jitsi-default-overrides.exists}">
<copy file="${lib}/jitsi-default-overrides.properties"
tofile="${debianize.dir}/../lib/jitsi-default-overrides.properties"
overwrite="true"
failonerror="false"/>
<!-- append to -->
<concat destfile="${debianize.dir}/${package.name}.install"
append="true"
eol="lf"
fixlastline="true">lib/jitsi-default-overrides.properties usr/share/${package.name}/lib/&#010;</concat>
</target>
<!-- sets custom build target or a custom one -->
<target name="-deb-build-target-replace"
depends="-deb-build-replace-custom,-deb-build-replace"/>
<!-- checks for custom target request by enabled property:
debianize.build.target.custom -->
<target name="-deb-build-replace-custom"
if="debianize.build.target.custom">
<replace file="${debianize.dir}/rules"
token="_BUILD_TARGET_"
value="copy-ready-scbundles -Dsc.basedir=${sc.basedir} -Dtarget.dir=${debian.target.dir}"/>
</target>
<!-- target that sets the build target that is in the property:
-deb-build-replace -->
<target name="-deb-build-replace">
<replace file="${debianize.dir}/rules"
token="_BUILD_TARGET_"
value="${debianize.build.target}"/>
</target>
<!-- copies already build scbundles to the target.dir folder -->
<target name="copy-ready-scbundles">
<mkdir dir="${target.dir}/sc-bundles"/>
<copy todir="${target.dir}/sc-bundles">
<fileset dir="${sc.basedir}/sc-bundles">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="-deb-sh-update-homedir"
if="application.home.dirname">
<replace file="${debianize.dir}/sh/${package.name}"
token="net.java.sip.communicator.launcher.SIPCommunicator"
value="-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=${application.home.dirname} net.java.sip.communicator.launcher.SIPCommunicator"/>
</target>
<target name="-deb-control-file"
depends="-deb-control-for-src,-deb-control-for-deb"/>
<!-- when using target deb-src use and control-src file -->
<target name="-deb-control-for-src"
if="debianize.src.pkg">
<copy file="${inst.resrc}/debian/control-src.tmpl"
tofile="${debianize.dir}/control"
overwrite="true"/>
<replace file="${debianize.dir}/control"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<replace file="${debianize.dir}/control"
token="_APP_NAME_"
value="${application.name}"/>
<replace file="${debianize.dir}/control"
token="_APP_WEB_"
value="${application.web}"/>
</target>
<!--
when called from deb target use the control file (not control-src one)
-->
<target name="-deb-control-for-deb"
unless="debianize.src.pkg">
<copy file="${inst.resrc}/debian/control.tmpl"
tofile="${debianize.dir}/control"
overwrite="true"/>
<replace file="${debianize.dir}/control"
token="_PACKAGE_NAME_"
value="${package.name}"/>
<replace file="${debianize.dir}/control"
token="_APP_NAME_"
value="${application.name}"/>
<replace file="${debianize.dir}/control"
token="_APP_WEB_"
value="${application.web}"/>
</target>
<!-- update the rules file if invoked from within deb target -->
<target name="-deb-rules-file-update"
unless="debianize.src.pkg">
<!-- first comment current override_dh_install-indep: rule -->
<replace file="${debianize.dir}/rules"
token="&#009;dh_install -p$(PACKAGE_NAME) "
value="#&#009;dh_install -p$(PACKAGE_NAME) "/>
<replace file="${debianize.dir}/rules"
token="override_dh_install-indep:"
value="#override_dh_install-indep:"/>
<replace file="${debianize.dir}/rules"
token="&#009;$(ANT) -file build.xml -Ddebian.bundles.dest"
value="#&#009;$(ANT) -file build.xml -Ddebian.bundles.dest"/>
<!-- now convert the rule override_dh_install-arch into
override_dh_install by adding the needed rules -->
<replace file="${debianize.dir}/rules"
token="override_dh_install-arch:"
value="override_dh_install:"/>
<replace file="${debianize.dir}/rules"
token="$(PACKAGE_NAME)-jni"
value="$(PACKAGE_NAME)"/>
<replace file="${debianize.dir}/rules"
token=" usr/lib/jni/"
value=" usr/share/$(PACKAGE_NAME)/lib/native -Xslickless.jar -Xslick-runner.jar -X-slick.jar -X.svn"/>
<!-- some libs are not found when adding libmozembed-linux-gtk1.2.so
and libjdic.so to deb and i386 package fail to build -->
<replace file="${debianize.dir}/rules"
token="get-orig-source:"
value="override_dh_shlibdeps:&#010;&#009;dh_shlibdeps -Xlibjunbound.so -Xlibsysactivitynotifications.so&#010;&#010;get-orig-source:"/>
<!-- removes the rule override_dh_auto_clean -->
<replace file="${debianize.dir}/rules"
token="override_dh_auto_clean"
value="#override_dh_auto_clean"/>
<replace file="${debianize.dir}/rules"
token="&#009;dh_auto_clean --"
value="#&#009;dh_auto_clean --"/>
</target>
<!-- copies links file only if used in the context of deb-src target -->
<target name="-deb-links-file"
if="debianize.src.pkg">
<copy file="${inst.resrc}/debian/package.links.tmpl"
tofile="${debianize.dir}/${package.name}.links"
overwrite="true"/>
<replace file="${debianize.dir}/${package.name}.links"
token="_PACKAGE_NAME_"
value="${package.name}"/>
</target>
<!-- change the package.install file if used from deb target -->
<target name="-deb-package.install-file-update">
<antcall target="-deb-package.install-file-update-non-src"/>
<antcall target="-deb-package.install-file-update-src"/>
</target>
<target name="-deb-package.install-file-update-non-src"
unless="debianize.src.pkg">
<concat destfile="${debianize.dir}/${package.name}.install"
append="true"
eol="lf"
fixlastline="true">lib/*.jar usr/share/${package.name}/lib/&#010;</concat>
<concat destfile="${debianize.dir}/${package.name}.install"
append="true"
eol="lf"
fixlastline="true">lib/bundle/commons-logging.jar usr/share/${package.name}/lib/bundle/&#010;lib/bundle/log4j.jar usr/share/${package.name}/lib/bundle/&#010;</concat>
<antcall target="-deb-package.install-file-update-splash"/>
</target>
<target name="-deb-package.install-file-update-splash"
if="splashscreen.enable">
<concat destfile="${debianize.dir}/${package.name}.install"
append="true"
eol="lf"
fixlastline="true">resources/install/resources/splash.gif usr/share/${package.name}/&#010;</concat>
</target>
<target name="-deb-package.install-file-update-src"
if="debianize.src.pkg">
<property name="splashscreen.enable" value="true"/>
<antcall target="-deb-package.install-file-update-splash"/>
</target>
<!-- updates the startup scritp only if called from deb target -->
<target name="-deb-sh-file-update"
unless="debianize.src.pkg">
<replace file="${debianize.dir}/sh/${package.name}"
token="/usr/share/java/org.apache.felix.framework.jar:/usr/share/java/org.apache.felix.main.jar"
value="$LIBPATH/felix.jar"/>
<replace file="${debianize.dir}/sh/${package.name}"
token="-common"
value="/sc-bundles"/>
<replace file="${debianize.dir}/sh/${package.name}"
token="util.jar/launchutils.jar"
value="util.jar"/>
<replace file="${debianize.dir}/sh/${package.name}"
token="/usr/lib/jni"
value="$SCDIR/lib/native"/>
</target>
<!-- use postinst and postrm files only if used from deb target -->
<target name="-deb-post-files-update"
unless="debianize.src.pkg">
<copy file="${inst.resrc}/debian/postinst"
tofile="${debianize.dir}/postinst"
overwrite="true"/>
<copy file="${inst.resrc}/debian/postrm"
tofile="${debianize.dir}/postrm"
overwrite="true"/>
</target>
<!-- Prepare to deploy the Debian package - This needs dpkg utilities -->
<target name="deb-rel" depends="deb,dpkg-scan-warning"
if="dpkg.scan.present"
description="Prepare to deploy Debian package (needs dpkg utilities)">
<mkdir dir="${debian.binary.dir}"/>
<move todir="${debian.binary.dir}">
<fileset dir="${debian.dir}">
<include name="sip-communicator*386*"/>
</fileset>
</move>
<exec executable="${dpkg-scanpackages}"
dir="${debian.dir}"
output="${debian.binary.dir}/dpkg-scanpackages.out"
errorproperty="dpkg-scanpackages.err">
<arg value="binary"/>
<arg value="/dev/null"/>
</exec>
<exec executable="/bin/gzip"
dir="${debian.dir}"
input="${debian.binary.dir}/dpkg-scanpackages.out"
output="${debian.binary.dir}/Packages.gz">
<arg value="-9c"/>
</exec>
<!-- Delete the temporary file -->
<delete file="${debian.binary.dir}/dpkg-scanpackages.out"
quiet="yes" failonerror="false"/>
</target>
<!-- clean for deb-src -->
<target name="clean-deb-src">
<delete dir="${debian.tmp.dir}/${package.name}-${sip-communicator.version}" />
</target>
<!-- copies jitsi source to ${target.dir},
the minimum source we need to build for debian using deb target -->
<target name="deb-copy-jitsi">
<copy todir="${target.dir}/resources">
<fileset dir="${sc.basedir}/resources">
<include name="**/*"/>
<exclude name="install/**"/>
</fileset>
<fileset dir="${sc.basedir}/resources">
<include name="install/build.xml"/>
<include name="install/ant-build-config.properties"/>
<include name="install/logging.properties"/>
<include name="install/resources/**/*"/>
</fileset>
</copy>
<copy todir="${target.dir}/src">
<fileset dir="${src}">
<include name="**/*"/>
<exclude name="**/growlnotification/**"/>
<exclude name="${extra.exclude}"/>
<exclude name="${extra.exclude2}"/>
<exclude name="**/dict/**"/>
<exclude name="**/dictaccregwizz/**"/>
<exclude name="**/ssh/**"/>
<exclude name="**/sshaccregwizz/**"/>
<exclude name="**/profiler4j/**"/>
<exclude name="**/windows/**"/>
<exclude name="**/windows32/**"/>
<exclude name="**/windows64/**"/>
<exclude name="**/native/addrbook/macosx/**"/>
<exclude name="**/native/macosx/**"/>
</fileset>
</copy>
<copy todir="${target.dir}/lib">
<fileset dir="${sc.basedir}/lib">
<include name="installer-exclude/*.manifest.mf"/>
</fileset>
</copy>
<copy todir="${target.dir}/test">
<fileset dir="${src2}">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${target.dir}">
<filelist dir="${sc.basedir}" files="build.xml"/>
</copy>
</target>
<!-- copies jitsi libs to ${target.dir} -->
<target name="deb-copy-jitsi-libs">
<copy todir="${target.dir}/lib">
<fileset dir="${sc.basedir}/lib">
<include name="**/*"/>
</fileset>
</copy>
</target>
<!-- creates a source package for jitsi that can be used to build
jitsi from sources including libraries and binaries. Intended to be used
by debian package maintainer (and watch file).
The target expects that the trunk of jitsi is in the same folder
with libsrc and libjitsi as:
/home/dev/debian-build:
- trunk/
- libsrc
- libjitsi
-->
<target name="deb-src"
depends="init,version,load-properties,clean-deb-src,dpkg-build-warning"
if="dpkg.build.present"
description="Create a .deb package for Debian (needs dpkg utilities)">
<property name="debian.src.dir"
value="${debian.tmp.dir}/${package.name}-${sip-communicator.version}" />
<mkdir dir="${debian.src.dir}"/>
<antcall target="deb-copy-jitsi">
<param name="target.dir" value="${debian.src.dir}"/>
<param name="extra.exclude" value="**/impl/googlecontacts/**"/>
<param name="extra.exclude2" value="**/plugin/thunderbird/**"/>
</antcall>
<property name="debianize.dir" value="${debian.src.dir}/debian" />
<!-- the target we will use to build the package,
depends whether we are building source package or just a deb -->
<property name="debianize.build.target"
value="init deb-src-rebuild" />
<!-- property indicating we are building a debian source package -->
<property name="debianize.src.pkg"
value="true" />
<!--
debianize the folder, using the files from resources/install/debian
-->
<antcall target="dpkg-debianize" />
<!-- Now create some links -->
<mkdir dir="${debian.src.dir}/lib/os-specific/linux"/>
<mkdir dir="${debian.src.dir}/lib/installer-exclude"/>
<mkdir dir="${debian.src.dir}/lib/src"/>
<!-- and add some sources-->
<!-- here we suppose jitsi is in the same folder with libjitsi
and libsrc
-->
<!-- jdic_misc -->
<unzip src="${sc.basedir}/../libsrc/jdic_misc.zip"
dest="${debian.src.dir}/lib/src/">
<patternset>
<exclude name="**/.svn/**"/>
</patternset>
</unzip>
<!-- joscar -->
<unzip src="${sc.basedir}/../libsrc/joscar.zip"
dest="${debian.src.dir}/lib/src">
<patternset>
<exclude name="**/*.jar"/>
<exclude name="**/*.class"/>
</patternset>
</unzip>
<unzip src="${debian.src.dir}/lib/src/joscar/lib/annotations.zip"
dest="${debian.src.dir}/lib/src/joscar/lib/annotations"/>
<unzip src="${sc.basedir}/../libsrc/jsocks.zip"
dest="${debian.src.dir}/lib/src"/>
<!-- OrangeExtensions -->
<unzip src="${sc.basedir}/../libsrc/OrangeExtensions.zip"
dest="${debian.src.dir}/lib/src"/>
<!-- swing worker -->
<unzip src="${sc.basedir}/../libsrc/swing-worker-src.zip"
dest="${debian.src.dir}/lib/src/swingworker"/>
<!-- smack -->
<unzip src="${sc.basedir}/../libsrc/smack/smack_src_3_2_2.zip"
dest="${debian.src.dir}/lib/src">
<patternset>
<exclude name="**/*.jar"/>
<exclude name="**/*.class"/>
</patternset>
</unzip>
<!-- jingle nodes -->
<unzip src="${sc.basedir}/../libsrc/jnsapi_src.zip"
dest="${debian.src.dir}/lib/src/jnsapi"/>
<!-- java-jml-->
<unzip src="${sc.basedir}/../libsrc/java-jml.zip"
dest="${debian.src.dir}/lib/src"/>
<!-- jymsg -->
<unzip src="${sc.basedir}/../libsrc/jymsg.zip"
dest="${debian.src.dir}/lib/src"/>
<!-- dhcp4j -->
<unzip src="${sc.basedir}/../libsrc/dhcp4java-1.00.src.zip"
dest="${debian.src.dir}/lib/src/dhcp4java"/>
<!-- otr4j -->
<mkdir dir="${debian.src.dir}/lib/src/otr4j/lib"/>
<copy todir="${debian.src.dir}/lib/src/otr4j">
<fileset dir="${sc.basedir}/../otr4j">
<include name="src/main/**"/>
<exclude name="**/.git/**"/>
</fileset>
</copy>
<!-- irc-api -->
<copy todir="${debian.src.dir}/lib/src/irc-api">
<fileset dir="${sc.basedir}/../irc-api">
<include name="src/main/**"/>
<exclude name="**/.svn/**"/>
</fileset>
</copy>
<!-- myspell-->
<unzip src="${sc.basedir}/../libsrc/jmyspell-core-src.zip"
dest="${debian.src.dir}/lib/src/jmyspell"/>
<!-- jfontchooser -->
<unzip src="${sc.basedir}/../libsrc/jfontchooser-src.zip"
dest="${debian.src.dir}/lib/src/jfontchooser"/>
<!-- gdata
<unzip src="${sc.basedir}/../libsrc/gdata-src.java-1.43.0.zip"
dest="${debian.src.dir}/lib/src">
<patternset>
<exclude name="**/*.orig"/>
<exclude name="**/*.jar"/>
</patternset>
</unzip>-->
<!-- jmork
<unzip src="${sc.basedir}/../libsrc/jmork-1.0.5-SNAPSHOT-sources.jar"
dest="${debian.src.dir}/lib/src/jmork"/>-->
<!-- native -->
<mkdir dir="${debian.src.dir}/lib/native/linux"/>
<mkdir dir="${debian.src.dir}/lib/native/linux-64"/>
<!-- pack as original sources -->
<tar destfile="${debian.dir}/${package.name}_${sip-communicator.version}.orig.tar.gz"
compression="gzip"
basedir="${debian.tmp.dir}"/>
<delete dir="${debian.tmp.dir}"/>
</target>
<!-- clean for debuild -->
<target name="clean-debuild" depends="load-properties">
<property name="debian.src.dir" value="." />
<!-- main build of jitsi -->
<ant dir="${debian.src.dir}/lib/src/swingworker"
inheritAll="false"
target="clean"/>
<exec dir="${debian.src.dir}/lib/src/joscar"
executable="ant"
failonerror="false">
<arg value="clean" />
</exec>
<delete dir="${debian.src.dir}/lib/src/jsocks/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/joscar/lib/annotations/classes"
failonerror="false"/>
<exec dir="${debian.src.dir}/lib/src/smack_src_3_2_2/build"
executable="ant"
failonerror="false">
<arg value="clean" />
</exec>
<delete dir="${debian.src.dir}/lib/src/jnsapi/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/java-jml/classes"
failonerror="false"/>
<ant dir="${debian.src.dir}/lib/src/misc"
inheritAll="true"
inheritRefs="true"
target="clean"/>
<ant dir="${debian.src.dir}/lib/src/jymsg"
inheritAll="false"
target="clean"/>
<delete dir="${debian.src.dir}/lib/src/dhcp4java/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/otr4j/bin"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/jmyspell/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/jfontchooser/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/OrangeExtensions/classes"
failonerror="false"/>
<!--ant dir="${debian.src.dir}/lib/src/gdata-java-client/java"
inheritAll="false"
target="clean"
antfile="build-src.xml"/>
<delete dir="${debian.src.dir}/lib/src/gdata-java-client/java/classes"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/gdata-java-client/java/genfiles"
failonerror="false"/>
<delete dir="${debian.src.dir}/lib/src/jmork/classes"
failonerror="false"/-->
<!-- delete all jars -->
<delete failonerror="false">
<fileset dir="${debian.src.dir}/lib">
<include name="**/*.jar"/>
<include name="**/*.so"/>
<include name="**/*.zip"/>
<include name="**/history.xml"/>
</fileset>
</delete>
<!-- deletes the symbolic links left as delete target skips them
if if removeNotFollowedSymlinks is set -->
<exec dir="${debian.src.dir}/lib"
executable="find"
failonerror="false">
<arg value="." />
<arg value="-name" />
<arg value="*.jar" />
<arg value="-delete" />
</exec>
</target>
<target name="-pre-deb-src-rebuild" depends="load-properties">
<dirname property="current.basedir" file="${ant.file.jitsi}"/>
<property name="debian.src.dir" value="${current.basedir}" />
<symlink resource="/usr/share/java/org.apache.felix.framework.jar"
overwrite="true"
link="${debian.src.dir}/lib/felix.jar"/>
<symlink resource="/usr/share/libjitsi/libjitsi.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="/usr/share/java/ant.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
</target>
<!-- Normally this target is invoked by debian source package -->
<target name="deb-src-rebuild"
depends="init,-pre-deb-src-rebuild,version">
<property name="debian.src.dir"
value="${debian.tmp.dir}/${package.name}-${sip-communicator.version}" />
<symlink resource="/usr/share/java/libphonenumber.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/libphonenumber-5.9.jar"/>
<symlink resource="/usr/share/java/org.apache.felix.main.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<symlink resource="/usr/share/java/weupnp.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/weupnp-0.1.2-SNAPSHOT.jar"/>
<!-- swingworker -->
<ant dir="${debian.src.dir}/lib/src/swingworker"
inheritAll="false"
target="bundles">
</ant>
<symlink resource="../src/swingworker/dist/bundles/swing-worker.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/swing-worker-1.2.jar"/>
<!-- joscar -->
<mkdir dir="${debian.src.dir}/lib/src/jsocks/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/jsocks/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/jsocks"/>
<exclude name="test/**" />
<include name="*.properties"/>
<include name="*.java"/>
<include name="*.gif"/>
</javac>
<jar compress="true" destfile="${debian.src.dir}/lib/src/jsocks/jsocks.jar">
<zipfileset dir="${debian.src.dir}/lib/src/jsocks/classes"/>
</jar>
<symlink resource="../../jsocks/jsocks.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/joscar/lib/jsocks.jar"/>
<mkdir dir="${debian.src.dir}/lib/src/joscar/lib/annotations/classes"/>
<javac classpathref="compile.class.path" debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/joscar/lib/annotations/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/joscar/lib/annotations"/>
<include name="**/*.java" />
</javac>
<symlink resource="/usr/share/java/bcpkix.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/joscar/lib"/>
<symlink resource="/usr/share/java/bcprov.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/joscar/lib"/>
<jar compress="true" destfile="${debian.src.dir}/lib/src/joscar/lib/annotations.jar">
<zipfileset dir="${debian.src.dir}/lib/src/joscar/lib/annotations/classes"/>
</jar>
<ant dir="${debian.src.dir}/lib/src/joscar"
inheritAll="false"
target="jars">
</ant>
<!-- now make the links -->
<symlink resource="../src/joscar/dist/joscar-client.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="../src/joscar/dist/joscar-common.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="../src/joscar/dist/joscar-protocol.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="../src/jsocks/jsocks.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jsocks-klea.jar"/>
<!-- smack -->
<symlink resource="/usr/share/java/ant-contrib.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/smack_src_3_2_2/build"/>
<symlink resource="/usr/share/java/xpp3-min.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/smack_src_3_2_2/build/merge/xpp.jar"/>
<symlink resource="/usr/share/java/jzlib.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/smack_src_3_2_2/build/merge/"/>
<ant dir="${debian.src.dir}/lib/src/smack_src_3_2_2/build"
useNativeBasedir="true"
inheritAll="false"
target="jar">
</ant>
<symlink resource="../src/smack_src_3_2_2/target/smack.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="../src/smack_src_3_2_2/target/smackx.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!--symlink resource="../installer-exclude/smack.manifest.mf"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/-->
<symlink resource="../src/smack_src_3_2_2/target/smackx-debug.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- jinglenodes -->
<mkdir dir="${debian.src.dir}/lib/src/jnsapi/lib"/>
<symlink resource="../../smack_src_3_2_2/target/smack.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/jnsapi/lib"/>
<symlink resource="../../smack_src_3_2_2/target/smackx.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/jnsapi/lib"/>
<mkdir dir="${debian.src.dir}/lib/src/jnsapi/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/jnsapi/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/jnsapi/src/main/java"/>
<include name="**/*.java" />
<classpath>
<fileset dir="${debian.src.dir}/lib/src/jnsapi/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<jar compress="true" destfile="${debian.src.dir}/lib/src/jnsapi/jnsapi.jar">
<zipfileset dir="${debian.src.dir}/lib/src/jnsapi/classes"/>
</jar>
<symlink resource="../src/jnsapi/jnsapi.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="/usr/share/java/dnsjava.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/dnsjava.jar"/>
<!-- java-jml needs libcommons-logging-java -->
<mkdir dir="${debian.src.dir}/lib/src/java-jml/lib"/>
<symlink resource="/usr/share/java/httpcore.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/java-jml/lib"/>
<symlink resource="/usr/share/java/commons-logging.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/java-jml/lib"/>
<mkdir dir="${debian.src.dir}/lib/src/java-jml/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/java-jml/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/java-jml/src"/>
<include name="**/*.java" />
<classpath>
<fileset dir="${debian.src.dir}/lib/src/java-jml/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<jar compress="true" destfile="${debian.src.dir}/lib/src/java-jml/java-jml.jar">
<zipfileset dir="${debian.src.dir}/lib/src/java-jml/classes"/>
</jar>
<symlink resource="../src/java-jml/java-jml.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jml-1.0b5.jar"/>
<!-- jdic misc -->
<ant dir="${debian.src.dir}/lib/src/misc"
inheritAll="true"
inheritRefs="true"
target="buildall"/>
<symlink resource="../src/misc/dist/linux/jdic_misc.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<copy file="${debian.src.dir}/lib/src/misc/dist/linux/libjdic_misc-64.so"
failonerror="false"
tofile="${debian.src.dir}/lib/native/linux-64/libjdic_misc.so"/>
<copy file="${debian.src.dir}/lib/src/misc/dist/linux/libjdic_misc-32.so"
failonerror="false"
tofile="${debian.src.dir}/lib/native/linux/libjdic_misc.so"/>
<!-- json -->
<symlink resource="/usr/share/java/json-simple.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/json-simple-1.1.1.jar"/>
<!-- jymsg -->
<ant dir="${debian.src.dir}/lib/src/jymsg"
inheritAll="false"
target="jars">
</ant>
<symlink resource="../src/jymsg/classes/ymsg_network_v0_67.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- dhcp4j -->
<mkdir dir="${debian.src.dir}/lib/src/dhcp4java/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/dhcp4java/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/dhcp4java/src"/>
<include name="**/*.java" />
</javac>
<jar compress="true" destfile="${debian.src.dir}/lib/src/dhcp4java/dhcp4java-1.00.jar">
<zipfileset dir="${debian.src.dir}/lib/src/dhcp4java/classes"/>
</jar>
<symlink resource="../src/dhcp4java/dhcp4java-1.00.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- jmdns -->
<symlink resource="/usr/share/java/jmdns.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- otr4j -->
<symlink resource="/usr/share/java/bcprov.jar"
overwrite="true"
link="${debian.src.dir}/lib/src/otr4j/lib"/>
<path id="otr4j-classpath">
<fileset dir="${debian.src.dir}/lib/src/otr4j/lib" includes="**/*.jar" />
</path>
<mkdir dir="${debian.src.dir}/lib/src/otr4j/bin/classes" />
<javac target="1.6" source="1.6"
srcdir="${debian.src.dir}/lib/src/otr4j/src"
destdir="${debian.src.dir}/lib/src/otr4j/bin/classes"
classpathref="otr4j-classpath"
debug="On" />
<jar destfile="${debian.src.dir}/lib/src/otr4j/bin/otr4j.jar"
basedir="${debian.src.dir}/lib/src/otr4j/bin/classes"/>
<symlink resource="../src/otr4j/bin/otr4j.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- irc-api -->
<path id="irc-api-classpath">
<fileset dir="/usr/share/java" includes="slf4j-api.jar" />
</path>
<mkdir dir="${debian.src.dir}/lib/src/irc-api/classes" />
<javac target="1.6" source="1.6"
srcdir="${debian.src.dir}/lib/src/irc-api/src"
destdir="${debian.src.dir}/lib/src/irc-api/classes"
classpathref="irc-api-classpath"
debug="On" />
<jar destfile="${debian.src.dir}/lib/src/irc-api/irc-api-1.0.jar"
basedir="${debian.src.dir}/lib/src/irc-api/classes">
<manifest>
<attribute name="Bundle-Name" value="IRC API"/>
<attribute name="Bundle-Description"
value="A Java implementation of the irc api"/>
<attribute name="Bundle-SymbolicName"
value="com.ircclouds.irc.api"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Version" value="1.0.0.0015-SNAPSHOT"/>
<attribute name="Import-Package"
value="javax.net.ssl,org.slf4j"/>
<attribute name="Export-Package"
value="com.ircclouds.irc.api;uses:=&quot;com.ircclouds.irc.api.commands,
com.ircclouds.irc.api.comms,com.ircclouds.irc.api.ctcp,com.ircclouds.irc.api.domain,
com.ircclouds.irc.api.domain.messages.interfaces,com.ircclouds.irc.api.filters,
com.ircclouds.irc.api.listeners,com.ircclouds.irc.api.state&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.commands;uses:=&quot;com.ircclouds.irc.api,
com.ircclouds.irc.api.domain.messages&quot;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.comms;uses:=&quot;javax.net.ssl&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.ctcp;uses:=&quot;com.ircclouds.irc.api&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.domain;uses:=&quot;com.ircclouds.irc.api.domain.messages.interfaces,
javax.net.ssl&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.domain.messages;uses:=&quot;com.ircclouds.irc.api.domain,
com.ircclouds.irc.api.domain.messages.interfaces&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.domain.messages.interfaces;uses:=&quot;com.ircclouds.irc.api.domain&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.filters;uses:=&quot;com.ircclouds.irc.api.domain.messages.interfaces,
com.ircclouds.irc.api.listeners&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.listeners;uses:=&quot;com.ircclouds.irc.api,
com.ircclouds.irc.api.domain,com.ircclouds.irc.api.domain.messages,
com.ircclouds.irc.api.domain.messages.interfaces,
com.ircclouds.irc.api.state&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.om;uses:=&quot;com.ircclouds.irc.api.domain,
com.ircclouds.irc.api.domain.messages,
com.ircclouds.irc.api.domain.messages.interfaces&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.state;uses:=&quot;com.ircclouds.irc.api.domain,
com.ircclouds.irc.api.domain.messages,
com.ircclouds.irc.api.listeners&quot;;version=&quot;1.0.0&quot;,
com.ircclouds.irc.api.utils;uses:=&quot;com.ircclouds.irc.api.domain,
com.ircclouds.irc.api.domain.messages.interfaces&quot;;version=&quot;1.0.0&quot;"/>
</manifest>
</jar>
<symlink resource="../src/irc-api/irc-api-1.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="/usr/share/java/slf4j-api.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/slf4j-api-1.7.5.jar"/>
<symlink resource="/usr/share/java/slf4j-jdk14.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/slf4j-jdk14-1.7.5.jar"/>
<!-- jmyspell -->
<mkdir dir="${debian.src.dir}/lib/src/jmyspell/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/jmyspell/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/jmyspell/src/main/java"/>
<src path="${debian.src.dir}/lib/src/jmyspell/src/main/resources"/>
<include name="**/*.java" />
<include name="**/*.properties" />
</javac>
<jar compress="true" destfile="${debian.src.dir}/lib/src/jmyspell/jmyspell-core.jar">
<zipfileset dir="${debian.src.dir}/lib/src/jmyspell/classes"/>
</jar>
<symlink resource="../src/jmyspell/jmyspell-core.jar" overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- jfontchooser -->
<mkdir dir="${debian.src.dir}/lib/src/jfontchooser/classes"/>
<javac debug="true"
deprecation="true" destdir="${debian.src.dir}/lib/src/jfontchooser/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${debian.src.dir}/lib/src/jfontchooser/src"/>
<include name="**/*.java" />
</javac>
<jar compress="true"
destfile="${debian.src.dir}/lib/src/jfontchooser/jfontchooser-1.0.5.jar">
<zipfileset dir="${debian.src.dir}/lib/src/jfontchooser/classes"/>
</jar>
<symlink resource="../src/jfontchooser/jfontchooser-1.0.5.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- libcommons-codec-java -->
<symlink resource="/usr/share/java/commons-codec.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/commons-codec-1.4.jar"/>
<!-- libcommons-lang-java -->
<symlink resource="/usr/share/java/commons-lang3.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/commons-lang3-3.1.jar"/>
<!-- libcommons-logging-java -->
<symlink resource="/usr/share/java/commons-logging.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/commons-logging-1.1.2.jar"/>
<!-- liblog4j1.2-java -->
<symlink resource="/usr/share/java/log4j-1.2.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- OrangeExtensions -->
<ant dir="${debian.src.dir}/lib/src/OrangeExtensions"
inheritAll="false"/>
<mkdir dir="${debian.src.dir}/lib/os-specific/mac"/>
<symlink resource="../../src/OrangeExtensions/dist/OrangeExtensions.jar"
overwrite="true"
link="${debian.src.dir}/lib/os-specific/mac/"/>
<symlink resource="/usr/share/libjitsi/lib/bccontrib.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/bccontrib-1.0-SNAPSHOT.jar"/>
<symlink resource="/usr/share/java/bcprov.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/bcprov-jdk15on-151.jar"/>
<symlink resource="/usr/share/java/bcpkix.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/bcpkix-jdk15on-151.jar"/>
<!-- liblaf-widget-java -->
<symlink resource="/usr/share/java/laf-widget.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- gdata
<ant dir="${debian.src.dir}/lib/src/gdata-java-client/java"
inheritAll="false"
target="build"
antfile="build-src.xml"
>
<property name="google-collect.jar"
value="/usr/share/java/guava.jar"/>
<property name="google-jsr305.jar"
value="/usr/share/java/jsr305.jar"/>
<property name="activation.jar"
value="/usr/share/java/glassfish-activation.jar"/>
<property name="mail.jar"
value="/usr/share/java/glassfish-mail.jar"/>
</ant>
<symlink
resource="../src/gdata-java-client/java/lib/gdata-client-1.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<symlink
resource="../src/gdata-java-client/java/lib/gdata-client-meta-1.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<symlink
resource="../src/gdata-java-client/java/lib/gdata-contacts-3.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<symlink
resource="../src/gdata-java-client/java/lib/gdata-contacts-meta-3.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<symlink
resource="../src/gdata-java-client/java/lib/gdata-core-1.0.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>-->
<symlink
resource="/usr/share/java/guava.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/guava-15.0.jar"/>
<symlink
resource="/usr/share/java/hsqldb.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/hsqldb.jar"/>
<!-- compile and pack jmork
<property name="jmork.src.folder" value="${debian.src.dir}/lib/src/jmork"/>
<mkdir dir="${jmork.src.folder}/classes" />
<javac debug="false" optimize="true"
destdir="${jmork.src.folder}/classes"
nowarn="false"
source="1.5" target="1.5" fork="true">
<src path="${jmork.src.folder}"/>
</javac>
<jar compress="true" destfile="${jmork.src.folder}/jmork-1.0.5-SNAPSHOT.jar">
<fileset dir="${jmork.src.folder}/classes">
</fileset>
<manifest>
<attribute name="Bundle-Name" value="Java Mork"/>
<attribute name="Bundle-Description"
value="A Java implementation of the Mork database format"/>
<attribute name="Bundle-SymbolicName"
value="jmork"/>
<attribute name="Bundle-Version" value="1.0.5.SNAPSHOT"/>
<attribute name="Import-Package"
value="javax.swing,javax.swing.filechooser"/>
<attribute name="Export-Package"
value="mork,mork.gui,mozilla.thunderbird"/>
</manifest>
</jar>
<symlink resource="../src/jmork/jmork-1.0.5-SNAPSHOT.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>-->
<symlink resource="/usr/share/java/junit.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- mac_widgets -->
<symlink
resource="/usr/share/java/mac_widgets.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/mac_widgets-0.9.5.jar"/>
<!-- forms -->
<symlink
resource="/usr/share/java/forms.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/forms-1.2.1.jar"/>
<!-- jna -->
<symlink resource="/usr/share/java/jna.jar"
link="${debian.src.dir}/lib/installer-exclude/jna.jar"/>
<symlink resource="/usr/share/java/jna-platform.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/"/>
<!-- ice4j -->
<symlink resource="/usr/share/libjitsi/lib/ice4j.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- fmj -->
<symlink resource="/usr/share/libjitsi/lib/fmj.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- zrtp -->
<symlink resource="/usr/share/libjitsi/lib/zrtp4j-light.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- sdes -->
<symlink resource="/usr/share/libjitsi/lib/sdes4j.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/sdes4j.jar"/>
<!-- libhttpcore-java libhttpmime-java libhttpclient-java -->
<symlink resource="/usr/share/java/httpclient.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/httpclient-osgi-4.2.3.jar"/>
<symlink resource="/usr/share/java/httpcore.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/httpcore-osgi-4.2.3.jar"/>
<symlink resource="/usr/share/java/httpmime.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/httpmime-4.1.2.jar"/>
<!-- jsip -->
<symlink resource="/usr/share/libjitsi/lib/jain-sdp.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jain-sdp.jar"/>
<symlink resource="/usr/share/libjitsi/lib/jain-sip-api.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jain-sip-api.jar"/>
<symlink resource="/usr/share/libjitsi/lib/jain-sip-ri.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jain-sip-ri.jar"/>
<!-- libdbus java libdbus-java -->
<symlink resource="/usr/share/java/dbus.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/libdbus-java-2.7.jar"/>
<symlink resource="/usr/share/java/hexdump-0.2.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<symlink resource="/usr/share/java/unix-0.5.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- easymock libeasymock-java-->
<symlink resource="/usr/share/java/easymock.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude"/>
<!-- libjcalendar-java -->
<symlink resource="/usr/share/java/jcalendar.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/jcalendar-1.4.jar"/>
<!-- now rebuild jitsi -->
<antcall target="rebuild"/>
<antcall target="make-and-deploy"/>
<!-- will build native libs -->
<symlink resource="/usr/share/java/ant-contrib-cpptasks.jar"
overwrite="true"
link="${debian.src.dir}/lib/installer-exclude/cpptasks.jar"/>
<antcall target="galagonotification"/>
<antcall target="globalshortcut"/>
<antcall target="hid"/>
<antcall target="sysactivity"/>
<antcall target="unbound"/>
<antcall target="hwaddressretriever"/>
</target>
<!-- target to rebuild the jna bundle reusing debian package -->
<target name="deb-bundle-jna">
<!-- Creates a bundle containing the win jna implementation
in debian dest folder debian.bundles.dest.-->
<unzip src="${debian.bundles.dest}/jnalib.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/jnalib.jar"/>
<mkdir dir="${debian.bundles.dest}/jnalib.jar/META-INF"/>
<symlink resource="/usr/share/java/jna.jar"
link="${debian.bundles.dest}/jnalib.jar/jna.jar"/>
<symlink resource="/usr/share/java/jna-platform.jar"
link="${debian.bundles.dest}/jnalib.jar/jna-platform.jar"/>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/jnalib.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/jnalib.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/jnalib.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,jna-platform.jar,jna.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the json bundle reusing debian package -->
<target name="deb-bundle-json">
<!-- Creates a bundle containing the json_simple implementation
in debian dest folder debian.bundles.dest.-->
<unzip src="${debian.bundles.dest}/json.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/json.jar"/>
<mkdir dir="${debian.bundles.dest}/json.jar/META-INF"/>
<symlink resource="/usr/share/java/json-simple.jar"
link="${debian.bundles.dest}/json.jar/json-simple.jar"/>
<manifest
file="${debian.bundles.dest}/json.jar/META-INF/MANIFEST.MF">
<attribute name="Bundle-Name" value="JSON.simple"/>
<attribute name="Bundle-Description"
value="A simple Java toolkit for JSON"/>
<attribute name="Bundle-SymbolicName"
value="com.googlecode.json-simple"/>
<attribute name="Bundle-Version" value="1.1.1"/>
<attribute name="System-Bundle" value="yes"/>
<attribute name="Export-Package"
value="org.json.simple,org.json.simple.parser"/>
<attribute name="Bundle-ClassPath" value=".,json-simple.jar"/>
</manifest>
<delete dir="${debian.bundles.dest}/META-INF"/>
</target>
<!-- target to rebuild the util bundle reusing debian package -->
<target name="deb-bundle-util" depends="version,load-properties">
<!-- Create a properties file that the arg handler could use
to determine SC's version -->
<echo
file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="APPLICATION_NAME=${application.name}${line.separator}" />
<echo
file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="PACKAGE_NAME=${package.name}${line.separator}"
append="true"/>
<echo file="${dest}/net/java/sip/communicator/util/launchutils/version.properties"
message="APPLICATION_VERSION=${sip-communicator.version}${line.separator}"
append="true"/>
<unzip src="${debian.bundles.dest}/util.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/util.jar"/>
<mkdir dir="${debian.bundles.common.dest}/util.jar/META-INF"/>
<symlink resource="/usr/share/java/dnsjava.jar"
link="${debian.bundles.common.dest}/util.jar/dnsjava.jar"/>
<!-- Create the util.jar-->
<jar compress="false"
destfile="${debian.bundles.common.dest}/util.jar/util.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/util"
prefix="net/java/sip/communicator/util">
<exclude name="dns/**"/>
</zipfileset>
</jar>
<!-- Create the launchutils.jar-->
<jar compress="false"
destfile="${debian.bundles.common.dest}/util.jar/launchutils.jar">
<zipfileset
dir="${dest}/net/java/sip/communicator/util/launchutils"
prefix="net/java/sip/communicator/util/launchutils"/>
<zipfileset dir="${dest}/net/java/sip/communicator/util"
prefix="net/java/sip/communicator/util">
<include name="ScStdOut*"/>
<include name="ScLogFormatter*"/>
<include name="Logger*"/>
<include name="FileHandler*"/>
</zipfileset>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.common.dest}/util.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<delete dir="${debian.bundles.dest}/util.jar"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.common.dest}/util.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.common.dest}/util.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,util.jar,dnsjava.jar&#013;&#010;&#013;&#010;</concat>
<!-- Use the system installed dnsjava -->
<echo file="${debian.bundles.dest}/../lib/felix.client.run.properties"
append="true">felix.auto.start.14= reference:file:/usr/share/java/dnsjava.jar
</echo>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/util.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/util.jar</replacevalue>
</replace>
</target>
<!-- target to rebuild the util bundle reusing debian package -->
<target name="deb-bundle-desktoputil">
<unzip src="${debian.bundles.dest}/desktoputil.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/desktoputil.jar"/>
<mkdir dir="${debian.bundles.dest}/desktoputil.jar/META-INF"/>
<symlink resource="/usr/share/java/laf-widget.jar"
link="${debian.bundles.dest}/desktoputil.jar/laf-widget.jar"/>
<!-- Create the desktoputil.jar-->
<jar compress="false"
destfile="${debian.bundles.dest}/desktoputil.jar/desktoputil.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/desktoputil"
prefix="net/java/sip/communicator/plugin/desktoputil">
<exclude name="dns/**"/>
</zipfileset>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/desktoputil.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/desktoputil.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/desktoputil.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,desktoputil.jar,laf-widget.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the sysactivitynotifications bundle reusing
debian package -->
<target name="deb-bundle-sysactivitynotifications">
<unzip src="${debian.bundles.dest}/sysactivitynotifications.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/sysactivitynotifications.jar"/>
<mkdir dir="${debian.bundles.dest}/sysactivitynotifications.jar/META-INF"/>
<symlink resource="/usr/share/java/dbus.jar"
link="${debian.bundles.dest}/sysactivitynotifications.jar/dbus.jar"/>
<symlink resource="/usr/share/java/unix.jar"
link="${debian.bundles.dest}/sysactivitynotifications.jar/unix.jar"/>
<symlink resource="/usr/share/java/hexdump.jar"
link="${debian.bundles.dest}/sysactivitynotifications.jar/hexdump.jar"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.dest}/sysactivitynotifications.jar/sysactivitynotifications.jar">
<zipfileset
dir="${dest}/net/java/sip/communicator/impl/sysactivity"
prefix="net/java/sip/communicator/impl/sysactivity" />
<zipfileset
dir="${dest}/net/java/sip/communicator/service/sysactivity"
prefix="net/java/sip/communicator/service/sysactivity"/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/sysactivitynotifications.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/sysactivitynotifications.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/sysactivitynotifications.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,sysactivitynotifications.jar,dbus.jar,unix.jar,hexdump.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the swing-ui bundle reusing debian package -->
<target name="deb-bundle-swing-ui">
<unzip src="${debian.bundles.dest}/swing-ui.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/swing-ui.jar"/>
<mkdir dir="${debian.bundles.dest}/swing-ui.jar/META-INF"/>
<symlink resource="/usr/share/java/forms.jar"
link="${debian.bundles.dest}/swing-ui.jar/forms.jar"/>
<symlink resource="/usr/share/java/mac_widgets.jar"
link="${debian.bundles.dest}/swing-ui.jar/"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.dest}/swing-ui.jar/swing-ui.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/gui"
prefix="net/java/sip/communicator/impl/gui"/>
<zipfileset src="lib/installer-exclude/swing-worker-1.2.jar"
prefix=""/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/swing-ui.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/swing-ui.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/swing-ui.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,swing-ui.jar,mac_widgets.jar,forms.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the smacklib bundle reusing debian package -->
<target name="deb-bundle-smacklib">
<unzip src="${debian.bundles.dest}/smacklib.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/smacklib.jar"/>
<mkdir dir="${debian.bundles.common.dest}/smacklib.jar/META-INF"/>
<symlink resource="/usr/share/java/xpp3-min.jar"
link="${debian.bundles.common.dest}/smacklib.jar/xpp3.jar"/>
<symlink resource="/usr/share/java/jzlib.jar"
link="${debian.bundles.common.dest}/smacklib.jar/jzlib.jar"/>
<!-- Create the smacklib .jar-->
<jar compress="false"
destfile="${debian.bundles.common.dest}/smacklib.jar/smacklib.jar"
manifest="lib/installer-exclude/smack.manifest.mf">
<zipfileset src="lib/installer-exclude/smackx-debug.jar" prefix=""/>
<zipfileset src="lib/installer-exclude/smack.jar" prefix=""/>
<zipfileset src="lib/installer-exclude/smackx.jar" prefix=""/>
<zipfileset src="lib/installer-exclude/jnsapi.jar" prefix=""/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.common.dest}/smacklib.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<delete dir="${debian.bundles.dest}/smacklib.jar"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.common.dest}/smacklib.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.common.dest}/smacklib.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,smacklib.jar,xpp3.jar,jzlib.jar&#013;&#010;&#013;&#010;</concat>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/smacklib.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/smacklib.jar</replacevalue>
</replace>
</target>
<!-- target to rebuild the jmdnslib bundle reusing debian package -->
<target name="deb-bundle-jmdnslib">
<unzip src="${debian.bundles.dest}/jmdnslib.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/jmdnslib.jar"/>
<mkdir dir="${debian.bundles.dest}/jmdnslib.jar/META-INF"/>
<symlink resource="/usr/share/java/jmdns.jar"
link="${debian.bundles.dest}/jmdnslib.jar/"/>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/jmdnslib.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/jmdnslib.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/jmdnslib.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,jmdns.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the bouncycastle bundle reusing
debian package adding it osgi manifest entries -->
<target name="deb-bundle-bouncycastle">
<delete file="${debian.bundles.dest}/bouncycastle.jar"/>
<mkdir dir="${debian.bundles.dest}/bouncycastle.jar/META-INF"/>
<copy file="${lib.noinst}/bcprov.manifest.mf"
tofile="${debian.bundles.dest}/bouncycastle.jar/META-INF/MANIFEST.MF"/>
<symlink resource="/usr/share/java/bcprov.jar"
link="${debian.bundles.dest}/bouncycastle.jar/"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/bouncycastle.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/bouncycastle.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,bcprov.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the account info bundle reusing debian package -->
<target name="deb-bundle-plugin-accountinfo">
<unzip src="${debian.bundles.dest}/accountinfo.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/accountinfo.jar"/>
<mkdir dir="${debian.bundles.dest}/accountinfo.jar/META-INF"/>
<symlink resource="/usr/share/java/jcalendar.jar"
link="${debian.bundles.dest}/accountinfo.jar/"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.dest}/accountinfo.jar/accountinfo.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/accountinfo"
prefix="net/java/sip/communicator/plugin/accountinfo"/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/accountinfo.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/accountinfo.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/accountinfo.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,accountinfo.jar,jcalendar.jar&#013;&#010;&#013;&#010;</concat>
</target>
<!-- target to rebuild the commons-lang bundle reusing debian package -->
<target name="deb-bundle-commons-lang">
<!-- Creates a bundle containing the commons-lang implementation
in debian dest folder debian.bundles.dest.-->
<delete file="${debian.bundles.dest}/commons-lang.jar" failonerror="false"/>
<mkdir dir="${debian.bundles.dest}/commons-lang.jar/META-INF"/>
<symlink resource="/usr/share/java/commons-lang3.jar"
link="${debian.bundles.dest}/commons-lang.jar/commons-lang.jar"/>
<copy file="${lib.noinst}/commons-lang3-3.1.manifest.mf"
tofile="${debian.bundles.dest}/commons-lang.jar/META-INF/MANIFEST.MF"/>
</target>
<!-- hsqldb missing bundle manifest -->
<target name="deb-bundle-hsqldb">
<!-- Creates a bundle containing the commons-lang implementation
in debian dest folder debian.bundles.dest.-->
<delete file="${debian.bundles.dest}/hsqldb.jar" failonerror="false"/>
<mkdir dir="${debian.bundles.dest}/hsqldb.jar/META-INF"/>
<symlink resource="/usr/share/java/hsqldb.jar"
link="${debian.bundles.dest}/hsqldb.jar/hsqldb.jar"/>
<copy file="${lib.noinst}/hsqldb.jar.manifest.mf"
tofile="${debian.bundles.dest}/hsqldb.jar/META-INF/MANIFEST.MF"/>
</target>
<!-- Fix all bundles that depends on libjitsi libs, to reuse them -->
<target name="deb-libjitsi-deps">
<symlink overwrite="true"
resource="/usr/share/libjitsi/lib/bccontrib.jar"
link="${debian.bundles.dest}/bccontrib.jar"/>
<unzip src="${debian.bundles.dest}/libjitsi.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/libjitsi.jar"/>
<mkdir dir="${debian.bundles.common.dest}/libjitsi.jar/META-INF"/>
<symlink resource="/usr/share/java/bcpkix.jar"
link="${debian.bundles.common.dest}/libjitsi.jar/"/>
<symlink resource="/usr/share/libjitsi/libjitsi.jar"
link="${debian.bundles.common.dest}/libjitsi.jar/"/>
<symlink resource="/usr/share/libjitsi/lib/fmj.jar"
link="${debian.bundles.common.dest}/libjitsi.jar/"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.common.dest}/libjitsi.jar/libjitsi-impl.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/libjitsi"
prefix="net/java/sip/communicator/impl/libjitsi"/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.common.dest}/libjitsi.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<delete dir="${debian.bundles.dest}/libjitsi.jar"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.common.dest}/libjitsi.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.common.dest}/libjitsi.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,libjitsi-impl.jar,fmj.jar,libjitsi.jar,bcpkix.jar&#013;&#010;&#013;&#010;</concat>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/libjitsi.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/libjitsi.jar</replacevalue>
</replace>
<!--bundle-netaddr-->
<unzip src="${debian.bundles.dest}/netaddr.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/netaddr.jar"/>
<mkdir dir="${debian.bundles.common.dest}/netaddr.jar/META-INF"/>
<symlink resource="/usr/share/libjitsi/lib/ice4j.jar"
link="${debian.bundles.common.dest}/netaddr.jar/"/>
<symlink resource="/usr/share/java/weupnp.jar"
link="${debian.bundles.common.dest}/netaddr.jar/"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.common.dest}/netaddr.jar/netaddr.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/service/netaddr"
prefix="net/java/sip/communicator/service/netaddr"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/netaddr"
prefix="net/java/sip/communicator/impl/netaddr"/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.common.dest}/netaddr.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<delete dir="${debian.bundles.dest}/netaddr.jar"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.common.dest}/netaddr.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.common.dest}/netaddr.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,netaddr.jar,ice4j.jar,weupnp.jar&#013;&#010;&#013;&#010;</concat>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/netaddr.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/netaddr.jar</replacevalue>
</replace>
<!--zrtp4j /usr/share/libjitsi/lib/zrtp4j-light.jar -->
<unzip src="${debian.bundles.dest}/zrtp4j.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/zrtp4j.jar"/>
<mkdir dir="${debian.bundles.dest}/zrtp4j.jar/META-INF"/>
<symlink resource="/usr/share/libjitsi/lib/zrtp4j-light.jar"
link="${debian.bundles.dest}/zrtp4j.jar/"/>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/zrtp4j.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/zrtp4j.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/zrtp4j.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,zrtp4j-light.jar&#013;&#010;&#013;&#010;</concat>
<!--sdes4j /usr/share/libjitsi/lib/sdes4j.jar -->
<unzip src="${debian.bundles.dest}/sdes4j.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/sdes4j.jar"/>
<mkdir dir="${debian.bundles.dest}/sdes4j.jar/META-INF"/>
<symlink resource="/usr/share/libjitsi/lib/sdes4j.jar"
link="${debian.bundles.dest}/sdes4j.jar/"/>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/sdes4j.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/sdes4j.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/sdes4j.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,sdes4j.jar&#013;&#010;&#013;&#010;</concat>
<!--bundle-sip-->
<unzip src="${debian.bundles.dest}/protocol-sip.jar"
dest="${debian.bundles.dest}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<delete file="${debian.bundles.dest}/protocol-sip.jar"/>
<mkdir dir="${debian.bundles.dest}/protocol-sip.jar/META-INF"/>
<symlink resource="/usr/share/libjitsi/lib/jain-sip-ri.jar"
link="${debian.bundles.dest}/protocol-sip.jar/"/>
<symlink resource="/usr/share/libjitsi/lib/jain-sip-api.jar"
link="${debian.bundles.dest}/protocol-sip.jar/"/>
<symlink resource="/usr/share/libjitsi/lib/jain-sdp.jar"
link="${debian.bundles.dest}/protocol-sip.jar/"/>
<!-- Create the sys .jar-->
<jar compress="false"
destfile="${debian.bundles.dest}/protocol-sip.jar/protocol-sip.jar">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/sip"
prefix="net/java/sip/communicator/impl/protocol/sip"/>
</jar>
<move file="${debian.bundles.dest}/META-INF/MANIFEST.MF"
todir="${debian.bundles.dest}/protocol-sip.jar/META-INF"/>
<delete dir="${debian.bundles.dest}/META-INF"/>
<!-- Removes the last empty line -->
<replaceregexp
file="${debian.bundles.dest}/protocol-sip.jar/META-INF/MANIFEST.MF"
match="^\r\n$"
flags="m"
replace=""/>
<concat
destfile="${debian.bundles.dest}/protocol-sip.jar/META-INF/MANIFEST.MF"
append="true"
eol="crlf"
fixlastline="true">Bundle-ClassPath: .,protocol-sip.jar,jain-sip-ri.jar.jar,jain-sip-api.jar.jar,jain-sdp.jar&#013;&#010;&#013;&#010;</concat>
</target>
<target name="deb-bundle-httpmime">
<delete file="${debian.bundles.dest}/httpmime.jar" failonerror="false"/>
<mkdir dir="${debian.bundles.dest}/httpmime.jar/META-INF"/>
<symlink resource="/usr/share/java/httpmime.jar"
link="${debian.bundles.dest}/httpmime.jar/httpmime.jar"/>
<manifest
file="${debian.bundles.dest}/httpmime.jar/META-INF/MANIFEST.MF">
<attribute name="Bundle-Name" value="Apache Http Mime"/>
<attribute name="Bundle-Description"
value="Apache Http Mime"/>
<attribute name="Bundle-SymbolicName"
value="org.apache.http.entity.mime"/>
<attribute name="Bundle-Version" value="4.2.3"/>
<attribute name="System-Bundle" value="yes"/>
<attribute name="Export-Package"
value="org.apache.http.entity.mime,org.apache.http.entity.mime.content"/>
<attribute name="Bundle-ClassPath" value=".,httpmime.jar"/>
</manifest>
</target>
<target name="deb-bundle-common">
<move file="${debian.bundles.dest}/protocol-jabber.jar"
tofile="${debian.bundles.common.dest}/protocol-jabber.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/protocol-jabber.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/protocol-jabber.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/protocol-media.jar"
tofile="${debian.bundles.common.dest}/protocol-media.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/protocol-media.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/protocol-media.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/protocol.jar"
tofile="${debian.bundles.common.dest}/protocol.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/protocol.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/protocol.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/configuration.jar"
tofile="${debian.bundles.common.dest}/configuration.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/configuration.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/configuration.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/dns.jar"
tofile="${debian.bundles.common.dest}/dns.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/dns.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/dns.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/dnsservice.jar"
tofile="${debian.bundles.common.dest}/dnsservice.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/dnsservice.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/dnsservice.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/fileaccess.jar"
tofile="${debian.bundles.common.dest}/fileaccess.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/fileaccess.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/fileaccess.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/packetlogging.jar"
tofile="${debian.bundles.common.dest}/packetlogging.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/packetlogging.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/packetlogging.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/resourcemanager.jar"
tofile="${debian.bundles.common.dest}/resourcemanager.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/resourcemanager.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/resourcemanager.jar</replacevalue>
</replace>
<move file="${debian.bundles.dest}/ui-service.jar"
tofile="${debian.bundles.common.dest}/ui-service.jar"/>
<replace file="${debian.bundles.dest}/../lib/felix.client.run.properties"
token="reference:file:sc-bundles/ui-service.jar">
<replacevalue>reference:file:/usr/share/jitsi-common/ui-service.jar</replacevalue>
</replace>
</target>
<target name="deb-bundle-slf4j">
<delete file="${debian.bundles.dest}/slf4j-api.jar" failonerror="false"/>
<mkdir dir="${debian.bundles.dest}/slf4j-api.jar/META-INF"/>
<symlink resource="/usr/share/java/slf4j-api.jar"
link="${debian.bundles.dest}/slf4j-api.jar/slf4j-api.jar"/>
<manifest
file="${debian.bundles.dest}/slf4j-api.jar/META-INF/MANIFEST.MF">
<attribute name="Bundle-Name"
value="slf4j-api"/>
<attribute name="Bundle-Description"
value="The slf4j API"/>
<attribute name="Bundle-SymbolicName"
value="slf4j.api"/>
<attribute name="Bundle-Version"
value="1.7.5"/>
<attribute name="System-Bundle"
value="yes"/>
<attribute name="Export-Package"
value="org.slf4j, org.slf4j.spi, org.slf4j.helpers"/>
<attribute name="Import-Package"
value="org.slf4j.impl"/>
<attribute name="Bundle-ClassPath"
value=".,slf4j-api.jar"/>
</manifest>
<delete file="${debian.bundles.dest}/slf4j-jdk14.jar" failonerror="false"/>
<mkdir dir="${debian.bundles.dest}/slf4j-jdk14.jar/META-INF"/>
<symlink resource="/usr/share/java/slf4j-jdk14.jar"
link="${debian.bundles.dest}/slf4j-jdk14.jar/slf4j-jdk14.jar"/>
<manifest
file="${debian.bundles.dest}/slf4j-jdk14.jar/META-INF/MANIFEST.MF">
<attribute name="Bundle-Name"
value="slf4j-jdk14"/>
<attribute name="Bundle-Description"
value="SLF4J JDK14 Binding"/>
<attribute name="Bundle-SymbolicName"
value="slf4j.jdk14"/>
<attribute name="Bundle-Version"
value="1.7.5"/>
<attribute name="System-Bundle"
value="yes"/>
<attribute name="Export-Package"
value="org.slf4j.impl"/>
<attribute name="Import-Package"
value="org.slf4j, org.slf4j.spi, org.slf4j.helpers"/>
<attribute name="Bundle-ClassPath"
value=".,slf4j-jdk14.jar"/>
</manifest>
</target>
</project>