]> git.ipfire.org Git - ipfire-3.x.git/blob - make.sh
Bump version number.
[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-prealpha1" # Version number
28 TOOLCHAINVERSION="${VERSION}-8" # Toolchain
29 SLOGAN="Lechery" # 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 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 ncurses
64 toolchain_make bash
65 toolchain_make bzip2
66 toolchain_make coreutils
67 toolchain_make diffutils
68 toolchain_make e2fsprogs
69 toolchain_make findutils
70 toolchain_make gawk
71 toolchain_make gettext
72 toolchain_make grep
73 toolchain_make gzip
74 toolchain_make m4
75 toolchain_make make
76 toolchain_make patch
77 toolchain_make perl
78 toolchain_make sed
79 toolchain_make tar
80 toolchain_make texinfo
81 toolchain_make flex
82 toolchain_make bc
83 toolchain_make util-linux-ng
84 toolchain_make strip
85 export PATH=$ORG_PATH
86 }
87
88 ################################################################################
89 # This builds the entire stage "base" #
90 ################################################################################
91 base_build() {
92
93 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:$TOOLS_DIR/bin
94 STAGE_ORDER=02
95 STAGE=base
96
97 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-base.log"
98 export LOGFILE
99
100 build_spy stage ${STAGE}
101
102 ipfire_make stage2
103 ipfire_make scripts
104 ipfire_make initd-tools
105 ipfire_make initscripts
106 ipfire_make gmp
107 ipfire_make mpfr
108 ipfire_make linux
109 ipfire_make man-pages
110 ipfire_make glibc
111 ipfire_make adjust-toolchain
112 ipfire_make binutils
113 ipfire_make gcc
114 ipfire_make berkeley
115 ipfire_make sed
116 ipfire_make e2fsprogs
117 ipfire_make coreutils
118 ipfire_make iana-etc
119 ipfire_make m4
120 ipfire_make bison
121 ipfire_make ncurses
122 ipfire_make procps
123 ipfire_make libtool
124 ipfire_make perl
125 ipfire_make readline
126 ipfire_make autoconf
127 ipfire_make automake
128 ipfire_make zlib
129 ipfire_make gettext
130 ipfire_make make
131 ipfire_make attr
132 ipfire_make libcap2
133 ipfire_make paxctl
134 ipfire_make bash
135 ipfire_make bzip2
136 ipfire_make diffutils
137 ipfire_make file
138 ipfire_make findutils
139 ipfire_make flex
140 ipfire_make grub
141 ipfire_make gawk
142 ipfire_make grep
143 ipfire_make groff
144 ipfire_make gzip
145 ipfire_make inetutils
146 ipfire_make iproute2
147 ipfire_make kbd
148 ipfire_make less
149 ipfire_make man-db
150 ipfire_make module-init-tools
151 ipfire_make patch
152 ipfire_make psmisc
153 ipfire_make shadow
154 ipfire_make sysklogd
155 ipfire_make sysvinit
156 ipfire_make tar
157 ipfire_make texinfo
158 ipfire_make udev ## NEED TO INSTALL CONFIG
159 ipfire_make util-linux-ng
160 ipfire_make vim
161 }
162
163 ################################################################################
164 # This builds the entire stage "ipfire" #
165 ################################################################################
166 ipfire_build() {
167 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
168 STAGE_ORDER=03
169 STAGE=ipfire
170
171 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-ipfire.log"
172 export LOGFILE
173
174 build_spy stage ${STAGE}
175
176 ### Building the configuration dirs and files
177 #
178 ipfire_make stage3
179 ipfire_make lzma
180
181 ipfire_make linux
182 ipfire_make aufs
183
184 ### Building some general stuff
185 # STAGE 1
186 ipfire_make pkg-config
187 ipfire_make expat
188 ipfire_make glib
189 ipfire_make dbus
190 ipfire_make dbus-glib
191 ipfire_make openssl
192 ipfire_make perl ### We are building the modules here.
193 ipfire_make python
194 ipfire_make python-dbus
195 ipfire_make python-urlgrabber
196 ipfire_make python-iconv
197 ipfire_make libxml2
198 ipfire_make libxslt
199 ipfire_make pcre
200 ipfire_make popt
201 ipfire_make libusb
202 ipfire_make bc
203 ipfire_make mingetty
204
205 ### Building some network stuff
206 #
207 ipfire_make libpcap
208 ipfire_make linux-atm
209 ipfire_make ppp
210 ipfire_make rp-pppoe
211 ipfire_make dhcp
212 ipfire_make iptables
213 ipfire_make libnfnetlink
214 ipfire_make libnetfilter_queue
215 ipfire_make libnetfilter_conntrack
216 ipfire_make libnetfilter_log
217 ipfire_make dnsmasq
218 ipfire_make l7-protocols
219 ipfire_make bridge-utils
220 ipfire_make vlan
221 ipfire_make bind
222 ipfire_make whois
223
224 ### Building some general stuff
225 # STAGE 2
226 ipfire_make cracklib
227 ipfire_make pam PASS=1
228 ipfire_make shadow
229 ipfire_make pam PASS=2
230 ipfire_make slang
231 ipfire_make newt
232 ipfire_make cyrus-sasl
233 ipfire_make openldap
234 ipfire_make pam_ldap
235 ipfire_make nss_ldap
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 ipfire_make directfb
256
257 ### Building vpn stuff
258 #
259 ipfire_make strongswan
260 #ipfire_make openvpn
261
262 ### Building filesystem stuff
263 #
264 ipfire_make reiserfsprogs
265 ipfire_make libaal
266 ipfire_make reiser4progs
267 ipfire_make xfsprogs
268 ipfire_make sysfsutils
269 ipfire_make squashfs
270
271 ### Building hardware utils
272 #
273 ipfire_make pciutils
274 ipfire_make usbutils
275 ipfire_make hdparm
276 ipfire_make smartmontools
277 ipfire_make lm-sensors
278 ipfire_make hal
279 ipfire_make hal-info
280
281 ### Building some important tools
282 #
283 ipfire_make ulogd2
284 ipfire_make fcron
285 ipfire_make which
286 ipfire_make screen
287 ipfire_make rrdtool
288 ipfire_make ntp ### Needs config.
289 ipfire_make openssh
290 ipfire_make ez-ipupdate
291 ipfire_make noip
292 ipfire_make lighttpd
293 ipfire_make collectd
294 ipfire_make logrotate
295 #ipfire_make logwatch
296 ipfire_make cpio
297 ipfire_make cdrtools
298 ipfire_make parted
299 ipfire_make python-parted
300 ipfire_make memtest86+
301 #ipfire_make pakfire
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 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 ipfire_make splashy
352
353 #ipfire_make squidguard ## CAN THIS BE BANISHED BY ANYTHING BETTER?
354 #ipfire_make calamaris ## CAN THIS BE BANISHED BY ANYTHING BETTER?
355 #ipfire_make vsftpd
356
357 ## NTFS
358 #ipfire_make fuse
359 #ipfire_make ntfs-3g
360 #
361 ## Net tools
362 #ipfire_make bwm-ng
363 #
364 ## UPNP
365 #ipfire_make libupnp
366 #ipfire_make linux-igd
367
368 ### These will become addons as usual but will be integrated later
369 #
370 #ipfire_make snort
371 #ipfire_make oinkmaster
372 #ipfire_make centerim
373 #ipfire_make tripwire
374 #ipfire_make java
375 #ipfire_make cups
376 #ipfire_make ghostscript
377 #ipfire_make foomatic
378 #ipfire_make hplip
379 #ipfire_make samba
380 #ipfire_make postfix
381 #ipfire_make fetchmail
382 #ipfire_make cyrus-imapd
383 #ipfire_make clamav
384 #ipfire_make alsa
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 stage ${STAGE}
432
433 ipfire_make stage5
434 ipfire_make pomona
435 }
436
437 ################################################################################
438 # This builds the entire stage "packages" #
439 ################################################################################
440 packages_build() {
441
442 PATH=${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/${MACHINE_REAL}-linux/bin
443 STAGE_ORDER=06
444 STAGE=packages
445
446 LOGFILE="$BASEDIR/log_${MACHINE}/_build.${STAGE_ORDER}-packages.log"
447 export LOGFILE
448
449 build_spy stage ${STAGE}
450
451 toolchain_make strip
452
453 # Generate ChangeLog
454 git_log
455
456 if [ ${EMB} -eq 0 ]; then
457 ipfire_make initramfs
458 ipfire_make images
459 ipfire_make pxe
460 ipfire_make cdrom
461
462 if check_loop; then
463 : #ipfire_make usb-key
464 else
465 echo -n "Can't build usb-key images on this machine"
466 beautify message WARN
467 fi
468 mv $LFS/$IMAGES_DIR/{*.iso,*.tar.gz,*.img.gz} $BASEDIR >>$LOGFILE 2>&1
469 else
470 if check_loop; then
471 # We put here the code that is done when
472 # we do an embedded build
473 :
474 fi
475 fi
476
477 # Build packages
478 for i in $(ls -1 $BASEDIR/src/rootfiles/extras); do
479 package=$(cut -d. -f2 <<< $i)
480 if [ -e $BASEDIR/lfs/$package ]; then
481 echo -n $package
482 beautify message SKIP
483 else
484 echo -n $package
485 beautify message SKIP
486 fi
487 done
488
489 # Cleanup
490 stdumount
491 rm -rf $LFS/tmp/*
492
493 cd $PWD
494 }
495
496 # See what we're supposed to do
497 . $BASEDIR/tools/make-interactive