]> git.ipfire.org Git - ipfire-3.x.git/blob - make.sh
Updated make.sh.
[ipfire-3.x.git] / make.sh
1 #!/bin/bash
2 ############################################################################
3 # #
4 # This file is part of the IPFire Firewall. #
5 # #
6 # IPFire is free software; you can redistribute it and/or modify #
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 # #
11 # IPFire is distributed in the hope that it will be useful, #
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 #
17 # along with IPFire; if not, write to the Free Software #
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
19 # #
20 # Copyright (C) 2008 IPFire-Team <info@ipfire.org>. #
21 # #
22 ############################################################################
23 #
24
25 NAME="IPFire" # Software name
26 SNAME="ipfire" # Short name
27 VERSION="3.0-prealpha" # Version number
28 TOOLCHAINVERSION="${VERSION}-5" # Toolchain
29 SLOGAN="www.ipfire.org" # Software slogan
30
31 # Include funtions
32 . tools/make-include
33
34
35 ################################################################################
36 # This builds the entire stage "toolchain" #
37 ################################################################################
38 toolchain_build() {
39
40 ORG_PATH=$PATH
41 export PATH=${TOOLS_DIR}/usr/bin:${TOOLS_DIR}/bin:$PATH
42 STAGE_ORDER=01
43 STAGE=toolchain
44
45 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-toolchain.log"
46 export LOGFILE
47
48 build_spy set stage ${STAGE} &
49
50 toolchain_make stage1
51 # make distcc first so that CCACHE_PREFIX works immediately
52 [ -z "$DISTCC_HOSTS" ] || toolchain_make distcc
53 toolchain_make ccache
54 toolchain_make gmp
55 toolchain_make mpfr
56 toolchain_make linux
57 toolchain_make binutils PASS=1
58 toolchain_make gcc PASS=1
59 toolchain_make glibc
60 toolchain_make adjust-toolchain
61 toolchain_make binutils PASS=2
62 toolchain_make gcc PASS=2
63 #toolchain_make tcl # Maybe this can be dropped
64 #toolchain_make expect # Maybe this can be dropped
65 #toolchain_make dejagnu # Maybe this can be dropped
66 toolchain_make ncurses
67 toolchain_make bash
68 toolchain_make bzip2
69 toolchain_make coreutils
70 toolchain_make diffutils
71 toolchain_make e2fsprogs
72 toolchain_make findutils
73 toolchain_make gawk
74 toolchain_make gettext
75 toolchain_make grep
76 toolchain_make gzip
77 toolchain_make m4
78 toolchain_make make
79 toolchain_make patch
80 toolchain_make perl
81 toolchain_make sed
82 toolchain_make tar
83 toolchain_make texinfo
84 #toolchain_make bison
85 toolchain_make flex
86 toolchain_make bc
87 toolchain_make util-linux-ng
88 toolchain_make strip
89 export PATH=$ORG_PATH
90 }
91
92 ################################################################################
93 # This builds the entire stage "base" #
94 ################################################################################
95 base_build() {
96
97 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:$TOOLS_DIR/bin
98 STAGE_ORDER=02
99 STAGE=base
100
101 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-base.log"
102 export LOGFILE
103
104 build_spy set stage ${STAGE} &
105
106 ipfire_make stage2
107 ipfire_make scripts
108 ipfire_make initscripts
109 ipfire_make gmp
110 ipfire_make mpfr
111 ipfire_make linux
112 ipfire_make man-pages
113 ipfire_make glibc
114 ipfire_make adjust-toolchain
115 ipfire_make binutils
116 ipfire_make gcc
117 ipfire_make berkeley
118 ipfire_make sed
119 ipfire_make e2fsprogs
120 ipfire_make coreutils
121 ipfire_make iana-etc
122 ipfire_make m4
123 ipfire_make bison
124 ipfire_make ncurses
125 ipfire_make procps
126 ipfire_make libtool
127 ipfire_make perl
128 ipfire_make readline
129 ipfire_make zlib
130 ipfire_make gettext
131 ipfire_make make
132 ipfire_make attr
133 ipfire_make libcap2
134 ipfire_make paxctl
135 ipfire_make autoconf
136 ipfire_make automake
137 ipfire_make bash
138 ipfire_make bzip2
139 ipfire_make diffutils
140 ipfire_make file
141 ipfire_make findutils
142 ipfire_make flex
143 ipfire_make grub
144 ipfire_make gawk
145 ipfire_make grep
146 ipfire_make groff
147 ipfire_make gzip
148 ipfire_make inetutils
149 ipfire_make iproute2
150 ipfire_make kbd
151 ipfire_make less
152 ipfire_make man-db
153 ipfire_make module-init-tools
154 ipfire_make patch
155 ipfire_make psmisc
156 ipfire_make shadow
157 ipfire_make sysklogd
158 ipfire_make sysvinit
159 ipfire_make tar
160 ipfire_make texinfo
161 ipfire_make udev ## NEED TO INSTALL CONFIG
162 ipfire_make util-linux-ng
163 ipfire_make vim
164 }
165
166 ################################################################################
167 # This builds the entire stage "ipfire" #
168 ################################################################################
169 ipfire_build() {
170 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
171 STAGE_ORDER=03
172 STAGE=ipfire
173
174 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-ipfire.log"
175 export LOGFILE
176
177 build_spy set stage ${STAGE} &
178
179 ### Building the configuration dirs and files
180 #
181 ipfire_make stage3
182 ipfire_make lzma
183
184 ipfire_make linux
185 ipfire_make aufs
186
187 ### Building some general stuff
188 # STAGE 1
189 ipfire_make pkg-config
190 ipfire_make expat
191 ipfire_make glib
192 ipfire_make dbus
193 ipfire_make dbus-glib
194 ipfire_make openssl
195 ipfire_make perl ### We are building the modules here.
196 ipfire_make python
197 ipfire_make python-dbus
198 ipfire_make python-urlgrabber
199 ipfire_make python-iconv
200 ipfire_make libxml2
201 ipfire_make libxslt
202 #ipfire_make libidn ### Do we need this?
203 ipfire_make pcre
204 ipfire_make popt
205 ipfire_make libusb
206 ipfire_make bc
207
208 ### Building some network stuff
209 #
210 ipfire_make libpcap
211 ipfire_make linux-atm
212 ipfire_make ppp
213 ipfire_make rp-pppoe
214 ipfire_make dhcp
215 ipfire_make iptables
216 ipfire_make libnfnetlink
217 ipfire_make libnetfilter_queue
218 ipfire_make libnetfilter_conntrack
219 ipfire_make libnetfilter_log
220 ipfire_make dnsmasq
221 ipfire_make l7-protocols
222 ipfire_make bridge-utils
223 ipfire_make vlan
224 ipfire_make bind
225 ipfire_make whois
226
227 ### Building some general stuff
228 # STAGE 2
229 ipfire_make pam PASS=1
230 ipfire_make shadow
231 ipfire_make pam PASS=2
232 ipfire_make slang
233 ipfire_make newt
234 ipfire_make cyrus-sasl
235 ipfire_make openldap
236 ipfire_make sqlite
237 ipfire_make curl
238 ipfire_make gnupg
239 ipfire_make sudo
240 #ipfire_make libjpeg
241 ipfire_make libpng
242 ipfire_make libtiff
243 ipfire_make libart
244 ipfire_make freetype
245 ipfire_make fontconfig
246 ipfire_make pixman
247 ipfire_make cairo
248 ipfire_make pango
249 ipfire_make lzo
250 ipfire_make lsof
251 ipfire_make br2684ctl
252 ipfire_make etherwake
253 ipfire_make beep
254 ipfire_make libuser
255
256 ### Building vpn stuff
257 #
258 ipfire_make strongswan
259 #ipfire_make openvpn
260
261 ### Building filesystem stuff
262 #
263 ipfire_make reiserfsprogs
264 ipfire_make libaal
265 ipfire_make reiser4progs
266 ipfire_make xfsprogs
267 ipfire_make sysfsutils
268 ipfire_make squashfs
269
270 ### Building hardware utils
271 #
272 ipfire_make pciutils
273 ipfire_make usbutils
274 ipfire_make hdparm
275 ipfire_make smartmontools
276 ipfire_make lm-sensors
277 ipfire_make hal
278 ipfire_make hal-info
279
280 ### Building some important tools
281 #
282 ipfire_make ulogd2
283 ipfire_make fcron
284 ipfire_make which
285 ipfire_make screen
286 ipfire_make rrdtool
287 ipfire_make ntp ### Needs config.
288 ipfire_make openssh
289 ipfire_make ez-ipupdate
290 ipfire_make noip
291 ipfire_make lighttpd
292 ipfire_make collectd
293 #ipfire_make logrotate
294 #ipfire_make logwatch
295 ipfire_make cpio
296 ipfire_make cdrtools
297 ipfire_make parted
298 ipfire_make python-parted
299 ipfire_make memtest86+
300 #ipfire_make pakfire
301 ipfire_make chkconfig
302
303 ipfire_make pyfire
304
305 ### -------------------------------------------------------------------------
306 ### Tools that maybe not needed
307 #
308 #ipfire_make gd
309 #ipfire_make libcap
310 #ipfire_make mtools
311 #ipfire_make mISDN
312
313 #ipfire_make wireless
314 #ipfire_make libsafe
315 }
316
317 ################################################################################
318 # This builds the entire stage "misc" #
319 ################################################################################
320 misc_build() {
321
322 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
323 STAGE_ORDER=04
324 STAGE=misc
325
326 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-misc.log"
327 export LOGFILE
328
329 build_spy set stage ${STAGE} &
330
331 ipfire_make stage4
332
333 ### Console tools
334 #
335 ipfire_make mc
336 #ipfire_make traceroute
337 #ipfire_make nmap
338 #ipfire_make rsync
339 #ipfire_make tcpdump
340 ipfire_make htop
341 ipfire_make nano
342 ipfire_make squid
343
344 ### Assembler
345 #
346 ipfire_make nasm
347 ipfire_make syslinux
348
349 ipfire_make bootutils
350 ipfire_make mkinitramfs
351
352 #ipfire_make squidguard ## CAN THIS BE BANISHED BY ANYTHING BETTER?
353 #ipfire_make calamaris ## CAN THIS BE BANISHED BY ANYTHING BETTER?
354 #ipfire_make vsftpd
355
356 ## NTFS
357 #ipfire_make fuse
358 #ipfire_make ntfs-3g
359 #
360 ## Net tools
361 #ipfire_make bwm-ng
362 #
363 ## UPNP
364 #ipfire_make libupnp
365 #ipfire_make linux-igd
366
367 ### These will become addons as usual but will be integrated later
368 #
369 #ipfire_make snort
370 #ipfire_make oinkmaster
371 #ipfire_make centerim
372 #ipfire_make tripwire
373 #ipfire_make java
374 #ipfire_make cups
375 #ipfire_make ghostscript
376 #ipfire_make foomatic
377 #ipfire_make hplip
378 #ipfire_make samba
379 #ipfire_make postfix
380 #ipfire_make fetchmail
381 #ipfire_make cyrus-imapd
382 #ipfire_make clamav
383 #ipfire_make alsa
384 #ipfire_make mpg123
385 #ipfire_make mpfire
386 #ipfire_make guardian
387 #ipfire_make libid3tag
388 #ipfire_make libmad
389 #ipfire_make libogg
390 #ipfire_make libvorbis
391 #ipfire_make lame
392 #ipfire_make sox
393 #ipfire_make libshout
394 #ipfire_make icecast
395 #ipfire_make icegenerator
396 #ipfire_make mpd
397 #ipfire_make mpc
398 #ipfire_make xvid
399 #ipfire_make libmpeg2
400 #ipfire_make videolan
401 #ipfire_make libpri
402 #ipfire_make asterisk
403 #ipfire_make libsigc++
404 #ipfire_make applejuice
405 #ipfire_make libtorrent
406 #ipfire_make rtorrent
407 #ipfire_make ipfireseeder
408 #ipfire_make nfs
409
410 # ---------------------------------------------------------------------------
411 #ipfire_make as86
412 #ipfire_make mbr
413
414 ### Debugging
415 #
416 ipfire_make strace
417 }
418
419 ################################################################################
420 # This builds the entire stage "installer" #
421 ################################################################################
422 installer_build() {
423
424 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
425 STAGE_ORDER=05
426 STAGE=installer
427
428 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-installer.log"
429 export LOGFILE
430
431 build_spy set stage ${STAGE} &
432
433 ipfire_make stage5
434 #ipfire_make initramfs
435 #ipfire_make pomona
436 }
437
438 ################################################################################
439 # This builds the entire stage "packages" #
440 ################################################################################
441 packages_build() {
442
443 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
444 STAGE_ORDER=06
445 STAGE=packages
446
447 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-packages.log"
448 export LOGFILE
449
450 build_spy set stage ${STAGE} &
451
452 toolchain_make strip
453
454 # Generate ChangeLog
455 git_log
456
457 if [ ${EMB} -eq 0 ]; then
458 ipfire_make initramfs
459
460 ipfire_make pxe
461 ipfire_make cdrom
462
463 if check_loop; then
464 : #ipfire_make usb-key
465 else
466 echo -n "Can't build usb-key images on this machine"
467 beautify message WARN
468 fi
469 mv $LFS/$IMAGES_DIR/{*.iso,*.tar.gz,*.img.gz} $BASEDIR >$LOGFILE 2>&1
470 else
471 if check_loop; then
472 # We put here the code that is done when
473 # we do an embedded build
474 :
475 fi
476 fi
477
478 # Build packages
479 for i in $(ls -1 $BASEDIR/src/rootfiles/extras); do
480 package=$(cut -d. -f2 <<< $i)
481 if [ -e $BASEDIR/lfs/$package ]; then
482 echo -n $package
483 beautify message SKIP
484 else
485 echo -n $package
486 beautify message SKIP
487 fi
488 done
489
490 # Cleanup
491 stdumount
492 rm -rf $LFS/tmp/*
493
494 cd $PWD
495 }
496
497 # See what we're supposed to do
498 . $BASEDIR/tools/make-interactive