|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : bootstrap.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="startup.bootstrap" default="install-dependencies" xmlns:ivy="antlib:org.apache.ivy.ant"> |
|
24 <description> |
|
25 Download libraries to bootstrap helium |
|
26 </description> |
|
27 |
|
28 <property name="build.type" value="subcon" /> |
|
29 <property name="tools.ivy.config.file" location="${helium.dir}/config/ivy/tools_ivy_settings.xml" /> |
|
30 |
|
31 <!-- Set proxy using Nokia settings by default --> |
|
32 <target name="proxy" unless="proxy.disabled"> |
|
33 <property name="proxy.host" value="172.16.42.137" /> |
|
34 <property name="proxy.port" value="8080" /> |
|
35 <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" /> |
|
36 </target> |
|
37 |
|
38 <property name="ivy.filename" value="ivy-2.0.0-beta2.jar" /> |
|
39 <property name="ivy.file" value="${helium.dir}/external/antlibs/${ivy.filename}" /> |
|
40 <available file="${ivy.file}" property="ivy.file.present" /> |
|
41 |
|
42 <!-- Download ivy jar --> |
|
43 <target name="get-ivy" unless="ivy.file.present" depends="proxy"> |
|
44 <mkdir dir="${helium.dir}/external/antlibs" /> |
|
45 <get src="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/ivy/ivy/2.0.0-beta2/${ivy.filename}" dest="${ivy.file}" /> |
|
46 </target> |
|
47 |
|
48 <!-- Install CruiseControl if not already installed --> |
|
49 <target name="install-cruisecontrol"> |
|
50 <if> |
|
51 <not> |
|
52 <available file="${helium.dir}/external/CruiseControl/real_cruisecontrol.bat" /> |
|
53 </not> |
|
54 <then> |
|
55 <antcall target="install-dependencies"> |
|
56 <param name="build.type" value="ido_install" /> |
|
57 </antcall> |
|
58 </then> |
|
59 </if> |
|
60 </target> |
|
61 |
|
62 <!-- Clean CruiseControl installation --> |
|
63 <target name="clean-cruisecontrol"> |
|
64 <delete includeemptydirs="true"> |
|
65 <fileset dir="${helium.dir}/external/CruiseControl"> |
|
66 <exclude name="cruisecontrol.bat" /> |
|
67 <exclude name="distribution.policy.S60" /> |
|
68 </fileset> |
|
69 </delete> |
|
70 </target> |
|
71 |
|
72 |
|
73 <!-- Set libs for bootstrap --> |
|
74 <target name="set-libs"> |
|
75 <path id="lib.path"> |
|
76 <fileset dir="${helium.dir}/external/antlibs" includes="**/*.jar" /> |
|
77 </path> |
|
78 |
|
79 <!-- External tasks. --> |
|
80 <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="lib.path" /> |
|
81 </target> |
|
82 |
|
83 <!-- Clean the Ivy cache. This is important if Ivy file content is changed. --> |
|
84 <target name="clean-ivy-cache" depends="set-libs"> |
|
85 <ivy:configure file="${tools.ivy.config.file}" /> |
|
86 <ivy:cleancache /> |
|
87 </target> |
|
88 |
|
89 <!-- Private: unzip jars --> |
|
90 <target name="unzip-jar"> |
|
91 <unzip src="${artifact.file}" dest="${helium.dir}/external/antlibs" /> |
|
92 </target> |
|
93 <!-- Private: unzip eggs --> |
|
94 <target name="unzip-egg"> |
|
95 <unzip src="${artifact.file}" dest="${helium.dir}/external/python/lib/2.5" /> |
|
96 </target> |
|
97 <!-- Private: ungzip eggs --> |
|
98 <target name="gunzip-egg"> |
|
99 <gunzip src="${artifact.file}" dest="${artifact.file}.tar" /> |
|
100 <untar src="${artifact.file}.tar" dest="${helium.dir}/external/python/lib/2.5" /> |
|
101 </target> |
|
102 <!-- Private: unbzip egg --> |
|
103 <target name="bunzip-egg"> |
|
104 <bunzip2 src="${artifact.file}" dest="${artifact.file}.tar" /> |
|
105 <untar src="${artifact.file}.tar" dest="${helium.dir}/external/python/lib/2.5" /> |
|
106 </target> |
|
107 |
|
108 <!-- Install libraries main target --> |
|
109 <target name="install-dependencies" depends="proxy,set-libs"> |
|
110 <ivy:configure file="${tools.ivy.config.file}" /> |
|
111 <ivy:resolve file="${helium.dir}/config/ivy/ivy.xml" conf="${build.type}" haltonfailure="false" /> |
|
112 |
|
113 <ivy:retrieve pattern="${helium.dir}/external/antlibs/[artifact]-[revision].[ext]" type="jar" /> |
|
114 <ivy:retrieve pattern="${helium.dir}/external/python/lib/2.5/[artifact]-[revision].[ext]" type="egg" /> |
|
115 <ivy:retrieve pattern="${helium.dir}/external/sources/[artifact]-[revision].[ext]" type="zip" /> |
|
116 |
|
117 <delete> |
|
118 <fileset dir="${helium.dir}/external/antlibs" includes="ant-optional*.jar" /> |
|
119 <fileset dir="${helium.dir}/external/antlibs" includes="ant-1.5.jar" /> |
|
120 </delete> |
|
121 |
|
122 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="lib.path" /> |
|
123 |
|
124 <if> |
|
125 <not> |
|
126 <available file="${helium.dir}/external/python/lib/2.5/easy-install.pth" /> |
|
127 </not> |
|
128 <then> |
|
129 <copy file="${helium.dir}/tools/startup/bootstrap/easy-install.pth" todir="${helium.dir}/external/python/lib/2.5" /> |
|
130 <copy file="${helium.dir}/tools/startup/bootstrap/site.py" todir="${helium.dir}/external/python/lib/2.5" /> |
|
131 </then> |
|
132 </if> |
|
133 </target> |
|
134 |
|
135 </project> |