1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
--- Arduino-1.6.8.orig/build/build.xml 2016-03-09 10:01:15.000000000 -0500
+++ Arduino-1.6.8/build/build.xml 2017-08-13 23:40:20.822832538 -0500
@@ -166,6 +166,15 @@
<mkdir dir="${target.path}/reference"/>
+ <antcall target="assemble-docs" />
+
+ <!-- Write the revision file! -->
+ <echo file="${target.path}/lib/version.txt" message="${version}" />
+
+ <antcall target="assemble-libraries" />
+ </target>
+
+ <target name="assemble-docs" unless="no_docs">
<!-- Unzip documentation -->
<antcall target="unzip">
<param name="archive_file" value="shared/reference-1.6.6-3.zip" />
@@ -185,15 +194,11 @@
<param name="final_folder" value="${target.path}/reference/Edison_help_files" />
<param name="dest_folder" value="${target.path}/reference/" />
</antcall>
-
- <!-- Write the revision file! -->
- <echo file="${target.path}/lib/version.txt" message="${version}" />
-
- <antcall target="assemble-libraries" />
</target>
<!-- copy library folder -->
- <target name="assemble-libraries" unless="light_bundle">
+ <target name="assemble-libraries" depends="assemble-libraries-full, assemble-libraries-light" />
+ <target name="assemble-libraries-full" unless="light_bundle">
<copy todir="${target.path}/libraries">
<fileset dir="../libraries"/>
</copy>
@@ -209,6 +214,9 @@
<download-library name="Mouse" version="1.0.1"/>
<download-library name="Keyboard" version="1.0.1"/>
</target>
+ <target name="assemble-libraries-light" if="light_bundle">
+ <mkdir dir="${target.path}/libraries" />
+ </target>
<macrodef name="download-library">
<attribute name="name"/>
@@ -444,21 +452,7 @@
<copy file="macosx/liblistSerials-1.0.5/osx/liblistSerialsj.dylib" todir="macosx/work/${staging_hardware_folder}/../lib/" />
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/liblistSerialsj.dylib" />
- <delete dir="${staging_folder}/arduino-builder-macosx" includeemptydirs="true"/>
- <mkdir dir="${staging_folder}/arduino-builder-macosx"/>
- <antcall target="untar">
- <param name="archive_file" value="./arduino-builder-macosx-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-macosx-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="final_folder" value="${staging_folder}/arduino-builder-macosx/arduino-builder" />
- <param name="dest_folder" value="${staging_folder}/arduino-builder-macosx" />
- </antcall>
- <copy file="${staging_folder}/arduino-builder-macosx/arduino-builder" tofile="macosx/work/${staging_hardware_folder}/../arduino-builder" />
- <chmod perm="755" file="macosx/work/${staging_hardware_folder}/../arduino-builder" />
- <move file="${staging_folder}/arduino-builder-macosx/tools" tofile="macosx/work/${staging_hardware_folder}/../tools-builder"/>
- <copy todir="macosx/work/${staging_hardware_folder}" overwrite="true">
- <fileset dir="${staging_folder}/arduino-builder-macosx/hardware" includes="*.txt"/>
- </copy>
- <delete dir="${staging_folder}/arduino-builder-macosx" includeemptydirs="true"/>
+ <antcall target="build-arduino-builder" />
<antcall target="portable-${portable}">
<param name="parentdir" value="macosx/work/${staging_hardware_folder}/.." />
@@ -625,28 +619,6 @@
<fileset dir="linux/work" includes="**/*.sh" />
</chmod>
- <antcall target="unzip">
- <param name="archive_file" value="./libastylej-2.05.1.zip" />
- <param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" />
- <param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
- <param name="dest_folder" value="${staging_folder}" />
- </antcall>
- <copy file="linux/libastylej-2.05.1/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
- <chmod perm="755" file="linux/work/lib/libastylej.so" />
-
- <antcall target="portable-${portable}">
- <param name="parentdir" value="linux/work" />
- </antcall>
-
- <antcall target="unzip">
- <param name="archive_file" value="./liblistSerials-1.0.5.zip" />
- <param name="archive_url" value="http://downloads.arduino.cc/liblistSerials/liblistSerials-1.0.5.zip" />
- <param name="final_folder" value="${staging_folder}/liblistSerials-1.0.5" />
- <param name="dest_folder" value="${staging_folder}" />
- </antcall>
- <copy file="linux/liblistSerials-1.0.5/linux${arch-bits}/liblistSerialsj.so" todir="linux/work/lib/" />
- <chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />
-
</target>
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
@@ -654,21 +626,7 @@
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/>
</antcall>
- <delete dir="${staging_folder}/arduino-builder-linux32" includeemptydirs="true"/>
- <mkdir dir="${staging_folder}/arduino-builder-linux32"/>
- <antcall target="untar">
- <param name="archive_file" value="./arduino-builder-linux32-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-linux32-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="final_folder" value="${staging_folder}/arduino-builder-linux32/arduino-builder" />
- <param name="dest_folder" value="${staging_folder}/arduino-builder-linux32" />
- </antcall>
- <copy file="${staging_folder}/arduino-builder-linux32/arduino-builder" tofile="linux/work/arduino-builder" />
- <chmod perm="755" file="linux/work/arduino-builder" />
- <move file="${staging_folder}/arduino-builder-linux32/tools" tofile="linux/work/tools-builder"/>
- <copy todir="linux/work/hardware" overwrite="true">
- <fileset dir="${staging_folder}/arduino-builder-linux32/hardware" includes="*.txt"/>
- </copy>
- <delete dir="${staging_folder}/arduino-builder-linux32" includeemptydirs="true"/>
+ <antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar"/>
@@ -686,21 +644,7 @@
<param name="JVM" value="${LINUX64_BUNDLED_JVM}"/>
</antcall>
- <delete dir="${staging_folder}/arduino-builder-linux64" includeemptydirs="true"/>
- <mkdir dir="${staging_folder}/arduino-builder-linux64"/>
- <antcall target="untar">
- <param name="archive_file" value="./arduino-builder-linux64-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-linux64-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
- <param name="final_folder" value="${staging_folder}/arduino-builder-linux64/arduino-builder" />
- <param name="dest_folder" value="${staging_folder}/arduino-builder-linux64" />
- </antcall>
- <copy file="${staging_folder}/arduino-builder-linux64/arduino-builder" tofile="linux/work/arduino-builder" />
- <chmod perm="755" file="linux/work/arduino-builder" />
- <move file="${staging_folder}/arduino-builder-linux64/tools" tofile="linux/work/tools-builder"/>
- <copy todir="linux/work/hardware" overwrite="true">
- <fileset dir="${staging_folder}/arduino-builder-linux64/hardware" includes="*.txt"/>
- </copy>
- <delete dir="${staging_folder}/arduino-builder-linux64" includeemptydirs="true"/>
+ <antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar"/>
@@ -737,6 +681,24 @@
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
+ <target name="build-arduino-builder" unless="no_arduino_builder">
+ <delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
+ <mkdir dir="${staging_folder}/arduino-builder-${platform}"/>
+ <antcall target="untar">
+ <param name="archive_file" value="./arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
+ <param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
+ <param name="final_folder" value="${staging_folder}/arduino-builder-${platform}/arduino-builder" />
+ <param name="dest_folder" value="${staging_folder}/arduino-builder-${platform}" />
+ </antcall>
+ <copy file="${staging_folder}/arduino-builder-${platform}/arduino-builder" tofile="linux/work/arduino-builder" />
+ <chmod perm="755" file="linux/work/arduino-builder" />
+ <move file="${staging_folder}/arduino-builder-${platform}/tools" tofile="linux/work/tools-builder"/>
+ <copy todir="linux/work/hardware" overwrite="true">
+ <fileset dir="${staging_folder}/arduino-builder-${platform}/hardware" includes="*.txt"/>
+ </copy>
+ <delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
+ </target>
+
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
<!-- hardware/tools/${dist_check_file} is checked for existence -->
@@ -747,8 +709,21 @@
<!-- Retrieve tool -->
<target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available">
+ <antcall target="untar-unzip-download-web" />
+ <antcall target="untar-unzip-download-local" />
+ </target>
+ <target name="untar-unzip-download-web" unless="local_sources">
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
</target>
+ <target name="untar-unzip-download-local" if="local_sources">
+ <basename file="${archive_file}" property="basename" />
+ <echo>Skipping download of ${archive_url}, using makepkg downloaded ${basename}</echo>
+ <exec executable="ln" failonerror="true">
+ <arg value="-s" />
+ <arg value="${basedir}/../../${basename}" />
+ <arg value="${archive_file}" />
+ </exec>
+ </target>
<target name="untar-unzip-checksum" depends="untar-unzip-download">
<echo>Testing checksum of "${archive_file}"</echo>
@@ -1085,23 +1060,14 @@
<target name="package-library-index-json-bundle">
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
- <get src="${package_index_url}.gz"
- dest="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.gz"
- verbose="true" skipexisting="false" />
- <gunzip src ="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.gz"
- dest="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
- <delete file="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.gz"/>
-
- <get src="${package_index_url}.sig"
- dest="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.sig"
- verbose="true" skipexisting="false" />
-
- <get src="${library_index_url}.gz"
- dest="${staging_folder}/work/${staging_hardware_folder}/../dist/library_index.json.gz"
- verbose="true" skipexisting="false" />
- <gunzip src ="${staging_folder}/work/${staging_hardware_folder}/../dist/library_index.json.gz"
- dest="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
- <delete file="${staging_folder}/work/${staging_hardware_folder}/../dist/library_index.json.gz"/>
+ <exec executable="cp" failonerror="true">
+ <arg value="../package_index.json" />
+ <arg value="${staging_folder}/work/dist/" />
+ </exec>
+ <exec executable="cp" failonerror="true">
+ <arg value="../library_index.json" />
+ <arg value="${staging_folder}/work/dist/" />
+ </exec>
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/>
</target>
|