]>
Commit | Line | Data |
---|---|---|
df5e82b3 | 1 | #!/bin/bash |
df5e82b3 MT |
2 | ############################################################################ |
3 | # # | |
f8e5510c | 4 | # This file is part of the IPFire Firewall. # |
df5e82b3 | 5 | # # |
f8e5510c | 6 | # IPFire is free software; you can redistribute it and/or modify # |
df5e82b3 MT |
7 | # it under the terms of the GNU General Public License as published by # |
8 | # the Free Software Foundation; either version 2 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
f8e5510c | 11 | # IPFire is distributed in the hope that it will be useful, # |
df5e82b3 MT |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
f8e5510c | 17 | # along with IPFire; if not, write to the Free Software # |
df5e82b3 MT |
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
19 | # # | |
06209efc | 20 | # Copyright (C) 2007 IPFire-Team <info@ipfire.org>. # |
df5e82b3 MT |
21 | # # |
22 | ############################################################################ | |
df5e82b3 MT |
23 | # |
24 | ||
06209efc MT |
25 | NAME="IPFire" # Software name |
26 | SNAME="ipfire" # Short name | |
ca8da28e MT |
27 | VERSION="2.9" # Version number |
28 | TOOLCHAINVERSION="${VERSION}" # Toolchain | |
06209efc | 29 | SLOGAN="www.ipfire.org" # Software slogan |
df5e82b3 | 30 | |
15679d9f | 31 | # Include funtions |
ca8da28e | 32 | . tools/make-include |
df5e82b3 | 33 | |
df5e82b3 | 34 | |
ca8da28e MT |
35 | ################################################################################ |
36 | # This builds the entire stage "toolchain" # | |
37 | ################################################################################ | |
38 | toolchain_build() { | |
df5e82b3 | 39 | |
ca8da28e MT |
40 | ORG_PATH=$PATH |
41 | export PATH=$BASEDIR/build_${MACHINE}/usr/local/ccache/bin:$BASEDIR/build_${MACHINE}/usr/local/distcc/bin:$BASEDIR/build_${MACHINE}/$TOOLS_DIR/bin:$PATH | |
42 | STAGE_ORDER=01 | |
43 | STAGE=toolchain | |
df5e82b3 | 44 | |
ca8da28e MT |
45 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.toolchain.log" |
46 | export LOGFILE | |
47 | ||
48 | NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}` | |
49 | export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1} | |
50 | ||
51 | # make distcc first so that CCACHE_PREFIX works immediately | |
0e61af85 | 52 | [ -z "$DISTCC_HOSTS" ] || toolchain_make distcc |
ca8da28e MT |
53 | toolchain_make ccache |
54 | ||
be472d5a MT |
55 | toolchain_make binutils PASS=1 |
56 | toolchain_make gcc PASS=1 | |
57 | toolchain_make linux | |
ca8da28e | 58 | toolchain_make glibc |
be472d5a | 59 | toolchain_make adjust-toolchain |
ca8da28e MT |
60 | toolchain_make tcl |
61 | toolchain_make expect | |
62 | toolchain_make dejagnu | |
be472d5a MT |
63 | toolchain_make gcc PASS=2 |
64 | toolchain_make binutils PASS=2 | |
ca8da28e MT |
65 | toolchain_make ncurses |
66 | toolchain_make bash | |
67 | toolchain_make bzip2 | |
68 | toolchain_make coreutils | |
69 | toolchain_make diffutils | |
70 | toolchain_make findutils | |
71 | toolchain_make gawk | |
72 | toolchain_make gettext | |
73 | toolchain_make grep | |
74 | toolchain_make gzip | |
ca8da28e MT |
75 | toolchain_make make |
76 | toolchain_make patch | |
77 | toolchain_make perl | |
78 | toolchain_make sed | |
79 | toolchain_make tar | |
80 | toolchain_make texinfo | |
356857d4 | 81 | toolchain_make util-linux-ng |
cf63eea7 | 82 | toolchain_make strip |
ca8da28e MT |
83 | export PATH=$ORG_PATH |
84 | } | |
df5e82b3 | 85 | |
ca8da28e MT |
86 | ################################################################################ |
87 | # This builds the entire stage "base" # | |
88 | ################################################################################ | |
89 | base_build() { | |
90 | ||
91 | PATH=/usr/local/ccache/bin:/usr/local/distcc/bin:/bin:/usr/bin:/sbin:/usr/sbin:$TOOLS_DIR/bin | |
92 | STAGE_ORDER=02 | |
93 | STAGE=base | |
94 | ||
95 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.base.log" | |
96 | export LOGFILE | |
3888140c | 97 | |
ca8da28e | 98 | ipfire_make stage2 |
3888140c | 99 | ipfire_make linux |
ca8da28e MT |
100 | ipfire_make man-pages |
101 | ipfire_make glibc | |
3888140c | 102 | ipfire_make adjust-toolchain |
ca8da28e MT |
103 | ipfire_make binutils |
104 | ipfire_make gcc | |
105 | ipfire_make berkeley | |
3888140c MT |
106 | ipfire_make sed |
107 | ipfire_make e2fsprogs | |
ca8da28e MT |
108 | ipfire_make coreutils |
109 | ipfire_make iana-etc | |
110 | ipfire_make m4 | |
111 | ipfire_make bison | |
112 | ipfire_make ncurses | |
113 | ipfire_make procps | |
ca8da28e MT |
114 | ipfire_make libtool |
115 | ipfire_make perl | |
116 | ipfire_make readline | |
117 | ipfire_make zlib | |
118 | ipfire_make autoconf | |
119 | ipfire_make automake | |
120 | ipfire_make bash | |
121 | ipfire_make bzip2 | |
122 | ipfire_make diffutils | |
ca8da28e MT |
123 | ipfire_make file |
124 | ipfire_make findutils | |
125 | ipfire_make flex | |
0e61af85 | 126 | ipfire_make grub |
ca8da28e MT |
127 | ipfire_make gawk |
128 | ipfire_make gettext | |
129 | ipfire_make grep | |
130 | ipfire_make groff | |
131 | ipfire_make gzip | |
132 | ipfire_make inetutils | |
133 | ipfire_make iproute2 | |
134 | ipfire_make kbd | |
135 | ipfire_make less | |
ca8da28e | 136 | ipfire_make make |
0e61af85 | 137 | ipfire_make man-db |
ca8da28e | 138 | ipfire_make mktemp |
0e61af85 | 139 | ipfire_make module-init-tools |
ca8da28e MT |
140 | ipfire_make patch |
141 | ipfire_make psmisc | |
ca8da28e MT |
142 | ipfire_make shadow |
143 | ipfire_make sysklogd | |
144 | ipfire_make sysvinit | |
145 | ipfire_make tar | |
146 | ipfire_make texinfo | |
246556fe | 147 | ipfire_make udev ## NEED TO INSTALL CONFIG |
356857d4 | 148 | ipfire_make util-linux-ng |
ca8da28e | 149 | ipfire_make vim |
ca8da28e | 150 | } |
df5e82b3 | 151 | |
ca8da28e MT |
152 | ################################################################################ |
153 | # This builds the entire stage "ipfire" # | |
154 | ################################################################################ | |
155 | ipfire_build() { | |
156 | PATH=/usr/local/ccache/bin:/usr/local/distcc/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin | |
157 | STAGE_ORDER=03 | |
158 | STAGE=ipfire | |
159 | ||
160 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.ipfire.log" | |
161 | export LOGFILE | |
246556fe MT |
162 | |
163 | ### Building the configuration dirs and files | |
164 | # | |
165 | ipfire_make stage3 | |
166 | ||
167 | ### Building the kernel stuff | |
168 | # | |
f76aefec | 169 | ipfire_make linux |
246556fe | 170 | |
51c2a8ee MT |
171 | ### Building some general stuff |
172 | # STAGE 1 | |
a97daddb | 173 | ipfire_make pkg-config |
51c2a8ee | 174 | ipfire_make expat |
bf7ce8dc | 175 | ipfire_make dbus |
51c2a8ee MT |
176 | ipfire_make glib |
177 | ipfire_make libxml2 | |
178 | ipfire_make libxslt | |
179 | ipfire_make openssl | |
180 | ipfire_make perl ### We are building the modules here. | |
181 | ipfire_make python | |
182 | ipfire_make gmp | |
183 | #ipfire_make libidn ### Do we need this? | |
184 | ipfire_make pcre | |
185 | ipfire_make popt | |
186 | ipfire_make libusb | |
a97daddb | 187 | |
246556fe MT |
188 | ### Building some network stuff |
189 | # | |
190 | ipfire_make libpcap | |
191 | ipfire_make linux-atm | |
192 | ipfire_make ppp | |
193 | ipfire_make rp-pppoe | |
194 | ipfire_make dhcp | |
195 | ipfire_make iptables | |
a97daddb MT |
196 | ipfire_make libnfnetlink |
197 | ipfire_make libnetfilter_queue | |
198 | ipfire_make libnetfilter_conntrack | |
0ebfc06d | 199 | ipfire_make libnetfilter_log |
246556fe | 200 | ipfire_make dnsmasq |
a97daddb MT |
201 | ipfire_make l7-protocols |
202 | ipfire_make iptstate | |
203 | ipfire_make bridge-utils | |
204 | ipfire_make vlan | |
d3a6643e | 205 | ipfire_make bind |
246556fe MT |
206 | |
207 | ### Building some general stuff | |
51c2a8ee | 208 | # STAGE 2 |
246556fe MT |
209 | ipfire_make pam PASS=1 |
210 | ipfire_make shadow | |
211 | ipfire_make pam PASS=2 | |
246556fe MT |
212 | ipfire_make slang |
213 | ipfire_make newt | |
214 | ipfire_make cyrus-sasl | |
cf63eea7 MT |
215 | ipfire_make openldap |
216 | ipfire_make sqlite | |
246556fe | 217 | ipfire_make curl |
246556fe MT |
218 | ipfire_make gnupg |
219 | ipfire_make sudo | |
220 | #ipfire_make libjpeg ### Do we need this? | |
221 | ipfire_make libpng | |
222 | ipfire_make libtiff | |
223 | ipfire_make libart | |
224 | ipfire_make freetype | |
225 | ipfire_make lzo | |
b8b94b55 MT |
226 | ipfire_make lsof |
227 | ipfire_make br2684ctl | |
228 | ipfire_make etherwake | |
229 | ipfire_make htop | |
230 | ipfire_make beep | |
246556fe | 231 | |
c33b4fab MT |
232 | ### Building vpn stuff |
233 | # | |
234 | ipfire_make strongswan | |
235 | ||
246556fe MT |
236 | ### Building filesystem stuff |
237 | # | |
238 | ipfire_make reiserfsprogs | |
239 | ipfire_make libaal | |
240 | ipfire_make reiser4progs | |
a97daddb | 241 | ipfire_make xfsprogs |
90708ef5 | 242 | ipfire_make sysfsutils |
246556fe MT |
243 | |
244 | ### Building hardware utils | |
245 | # | |
246 | ipfire_make pciutils | |
247 | ipfire_make usbutils | |
248 | ipfire_make hdparm | |
249 | ipfire_make kudzu | |
b8b94b55 | 250 | ipfire_make smartmontools |
90708ef5 | 251 | ipfire_make lm-sensors |
51c2a8ee | 252 | ipfire_make hal |
246556fe MT |
253 | |
254 | ### Building some important tools | |
255 | # | |
908e611e | 256 | ipfire_make ulogd2 |
246556fe MT |
257 | ipfire_make fcron |
258 | ipfire_make which | |
259 | ipfire_make nano | |
260 | ipfire_make screen | |
261 | ipfire_make rrdtool | |
262 | ipfire_make ntp ### Needs config. | |
263 | ipfire_make openssh | |
b8b94b55 MT |
264 | ipfire_make ez-ipupdate |
265 | ipfire_make noip | |
266 | ipfire_make lighttpd | |
31c59de6 | 267 | ipfire_make lzma |
90708ef5 | 268 | ipfire_make collectd |
cf63eea7 MT |
269 | #ipfire_make logrotate |
270 | #ipfire_make logwatch | |
d3a6643e MT |
271 | ipfire_make cpio |
272 | ipfire_make cdrtools | |
273 | ipfire_make parted | |
274 | ipfire_make memtest86+ | |
cf63eea7 MT |
275 | #ipfire_make pakfire |
276 | #ipfire_make initscripts | |
51c2a8ee MT |
277 | |
278 | ipfire_make pyfire | |
d3a6643e | 279 | |
cf63eea7 MT |
280 | ### ------------------------------------------------------------------------- |
281 | ### Tools that maybe not needed | |
282 | # | |
283 | #ipfire_make expat | |
cf63eea7 MT |
284 | #ipfire_make gd |
285 | #ipfire_make libcap | |
286 | #ipfire_make mtools | |
287 | #ipfire_make mISDN | |
288 | ||
289 | #ipfire_make nasm | |
290 | #ipfire_make wireless | |
291 | #ipfire_make libsafe | |
246556fe MT |
292 | } |
293 | ||
294 | ################################################################################ | |
295 | # This builds the entire stage "misc" # | |
296 | ################################################################################ | |
297 | misc_build() { | |
298 | ||
299 | PATH=/usr/local/ccache/bin:/usr/local/distcc/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin | |
300 | STAGE_ORDER=04 | |
301 | STAGE=misc | |
302 | ||
303 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.misc.log" | |
304 | export LOGFILE | |
305 | ||
d3a6643e | 306 | ipfire_make stage4 |
e53fbf32 | 307 | |
d3a6643e MT |
308 | ### Console tools |
309 | # | |
67deab0a | 310 | ipfire_make mc |
d3a6643e MT |
311 | #ipfire_make traceroute |
312 | #ipfire_make nmap | |
313 | #ipfire_make rsync | |
314 | #ipfire_make tcpdump | |
67deab0a | 315 | |
d3a6643e | 316 | #ipfire_make squid |
d3a6643e MT |
317 | #ipfire_make squidguard ## CAN THIS BE BANISHED BY ANYTHING BETTER? |
318 | #ipfire_make calamaris ## CAN THIS BE BANISHED BY ANYTHING BETTER? | |
319 | #ipfire_make vsftpd | |
246556fe | 320 | |
d3a6643e MT |
321 | ### Programs that are still for discussion |
322 | # package or in the standard system | |
323 | # | |
324 | ## NTFS | |
325 | #ipfire_make fuse | |
cf63eea7 MT |
326 | #ipfire_make ntfs-3g |
327 | # | |
328 | ## Net tools | |
329 | #ipfire_make bwm-ng | |
330 | #ipfire_make openvpn | |
331 | # | |
332 | ## UPNP | |
333 | #ipfire_make libupnp | |
334 | #ipfire_make linux-igd | |
d3a6643e MT |
335 | |
336 | ### These will become addons as usual but will be integrated later | |
337 | # | |
246556fe MT |
338 | #ipfire_make snort |
339 | #ipfire_make oinkmaster | |
e53fbf32 | 340 | #ipfire_make centerim |
e53fbf32 MT |
341 | #ipfire_make tripwire |
342 | #ipfire_make java | |
31c59de6 MT |
343 | #ipfire_make cups |
344 | #ipfire_make ghostscript | |
345 | #ipfire_make foomatic | |
346 | #ipfire_make hplip | |
347 | #ipfire_make samba | |
31c59de6 MT |
348 | #ipfire_make postfix |
349 | #ipfire_make fetchmail | |
350 | #ipfire_make cyrus-imapd | |
351 | #ipfire_make clamav | |
352 | #ipfire_make alsa | |
353 | #ipfire_make mpg123 | |
354 | #ipfire_make mpfire | |
355 | #ipfire_make guardian | |
356 | #ipfire_make libid3tag | |
357 | #ipfire_make libmad | |
358 | #ipfire_make libogg | |
359 | #ipfire_make libvorbis | |
360 | #ipfire_make lame | |
361 | #ipfire_make sox | |
362 | #ipfire_make libshout | |
363 | #ipfire_make icecast | |
364 | #ipfire_make icegenerator | |
365 | #ipfire_make mpd | |
366 | #ipfire_make mpc | |
367 | #ipfire_make xvid | |
368 | #ipfire_make libmpeg2 | |
369 | #ipfire_make videolan | |
370 | #ipfire_make libpri | |
371 | #ipfire_make asterisk | |
31c59de6 MT |
372 | #ipfire_make libsigc++ |
373 | #ipfire_make applejuice | |
31c59de6 MT |
374 | #ipfire_make libtorrent |
375 | #ipfire_make rtorrent | |
376 | #ipfire_make ipfireseeder | |
31c59de6 | 377 | #ipfire_make nfs |
ca8da28e | 378 | |
d3a6643e MT |
379 | # --------------------------------------------------------------------------- |
380 | #ipfire_make as86 | |
381 | #ipfire_make mbr | |
df5e82b3 MT |
382 | } |
383 | ||
ca8da28e MT |
384 | ################################################################################ |
385 | # This builds the entire stage "installer" # | |
386 | ################################################################################ | |
387 | installer_build() { | |
388 | ||
389 | PATH=/usr/local/ccache/bin:/usr/local/distcc/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin | |
390 | STAGE_ORDER=05 | |
391 | STAGE=installer | |
392 | ||
393 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.installer.log" | |
394 | export LOGFILE | |
246556fe | 395 | |
79fda7b6 | 396 | ipfire_make stage5 |
e53fbf32 | 397 | ipfire_make busybox |
b09ca36a | 398 | ipfire_make installer |
e53fbf32 | 399 | ipfire_make initramfs |
df5e82b3 MT |
400 | } |
401 | ||
ca8da28e MT |
402 | ################################################################################ |
403 | # This builds the entire stage "packages" # | |
404 | ################################################################################ | |
405 | packages_build() { | |
df5e82b3 | 406 | |
ca8da28e MT |
407 | PATH=/usr/local/ccache/bin:/usr/local/distcc/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin |
408 | STAGE_ORDER=06 | |
409 | STAGE=packages | |
df5e82b3 | 410 | |
ca8da28e MT |
411 | LOGFILE="$BASEDIR/log_${MACHINE}/_build.packages.log" |
412 | export LOGFILE | |
0fbb45e9 | 413 | |
cf63eea7 | 414 | toolchain_make strip |
df5e82b3 MT |
415 | |
416 | # Generating list of packages used | |
f90f9467 | 417 | ### MISSING ATM |
df5e82b3 | 418 | |
f90f9467 | 419 | ipfire_make cdrom |
74dbbc36 | 420 | |
4dc82852 | 421 | # Check if there is a loop device for building in virtual environments |
65151129 MT |
422 | #if [ -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then |
423 | # ipfire_make usb-stick | |
424 | #fi | |
f90f9467 | 425 | mv $LFS/$IMAGES_DIR/{*.iso,*.tgz,*.img.gz} $BASEDIR >> $LOGFILE 2>&1 |
c9673262 | 426 | |
f90f9467 MT |
427 | #ipfire_make core-updates |
428 | ### DISABLED ATM | |
429 | ||
084ab6f4 | 430 | for i in $(ls -1 $BASEDIR/src/rootfiles/extras); do |
453b418b | 431 | if [ -e $BASEDIR/lfs/$i ]; then |
f90f9467 MT |
432 | echo -n |
433 | ### Do nothing at the moment, we are gonna use a new packager | |
453b418b MT |
434 | else |
435 | echo -n $i | |
436 | beautify message SKIP | |
437 | fi | |
fe7fe395 | 438 | done |
f90f9467 MT |
439 | |
440 | # Cleanup | |
441 | stdumount | |
442 | rm -rf $LFS/tmp/* | |
443 | ||
444 | cd $PWD | |
df5e82b3 MT |
445 | } |
446 | ||
447 | # See what we're supposed to do | |
ce85f613 | 448 | . $BASEDIR/tools/make-interactive |