]> git.ipfire.org Git - ipfire-2.x.git/blame - make.sh
Cleaned the squidclamav config file
[ipfire-2.x.git] / make.sh
CommitLineData
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
25NAME="IPFire" # Software name
26SNAME="ipfire" # Short name
7c0736aa 27VERSION="2.1" # Version number
06209efc
MT
28SLOGAN="www.ipfire.org" # Software slogan
29CONFIG_ROOT=/var/ipfire # Configuration rootdir
30NICE=10 # Nice level
31MAX_RETRIES=1 # prefetch/check loop
15679d9f
MT
32KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
33MACHINE=`uname -m`
34SVN_REVISION=`svn info | grep Revision | cut -c 11-`
35
8f7b33ea 36IPFVER="full" # Which versions should be compiled? (full|devel)
03ad5f93 37
15679d9f
MT
38# Debian specific settings
39if [ ! -e /etc/debian_version ]; then
df5e82b3 40 FULLPATH=`which $0`
15679d9f 41else
df5e82b3
MT
42 if [ -x /usr/bin/realpath ]; then
43 FULLPATH=`/usr/bin/realpath $0`
44 else
45 echo "ERROR: Need to do apt-get install realpath"
46 exit 1
47 fi
15679d9f 48fi
df5e82b3 49
15679d9f
MT
50PWD=`pwd`
51BASENAME=`basename $0`
52BASEDIR=`echo $FULLPATH | sed "s/\/$BASENAME//g"`
53LOGFILE=$BASEDIR/log/_build.preparation.log
54export BASEDIR LOGFILE
55DIR_CHK=$BASEDIR/cache/check
56mkdir $BASEDIR/log/ 2>/dev/null
df5e82b3 57
15679d9f
MT
58# Include funtions
59. tools/make-functions
df5e82b3 60
15679d9f
MT
61if [ -f .config ]; then
62 . .config
63else
6b8cff41
MT
64 echo -e "${BOLD}No configuration found!${NORMAL}"
65 echo -ne "Do you want to create one (y/N)?"
66 read CREATE_CONFIG
67 echo ""
68 if [ "$CREATE_CONFIG" == "y" ]; then
69 make_config
70 fi
15679d9f 71fi
df5e82b3
MT
72
73prepareenv() {
74 ############################################################################
75 # #
76 # Are we running the right shell? #
77 # #
78 ############################################################################
79 if [ ! "$BASH" ]; then
1b273e8f 80 exiterror "BASH environment variable is not set. You're probably running the wrong shell."
df5e82b3
MT
81 fi
82
83 if [ -z "${BASH_VERSION}" ]; then
1b273e8f 84 exiterror "Not running BASH shell."
df5e82b3
MT
85 fi
86
87
88 ############################################################################
89 # #
90 # Trap on emergency exit #
91 # #
92 ############################################################################
93 trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGKILL SIGSTOP SIGQUIT
94
95
96 ############################################################################
97 # #
98 # Resetting our nice level #
99 # #
100 ############################################################################
9b0ff0a0 101 echo -ne "Resetting our nice level to $NICE" | tee -a $LOGFILE
df5e82b3
MT
102 renice $NICE $$ > /dev/null
103 if [ `nice` != "$NICE" ]; then
1b273e8f
MT
104 beautify message FAIL
105 exiterror "Failed to set correct nice level"
15679d9f 106 else
1b273e8f 107 beautify message DONE
df5e82b3
MT
108 fi
109
15679d9f 110
df5e82b3
MT
111 ############################################################################
112 # #
113 # Checking if running as root user #
114 # #
115 ############################################################################
9b0ff0a0 116 echo -ne "Checking if we're running as root user" | tee -a $LOGFILE
df5e82b3 117 if [ `id -u` != 0 ]; then
1b273e8f
MT
118 beautify message FAIL
119 exiterror "Not building as root"
15679d9f 120 else
1b273e8f 121 beautify message DONE
df5e82b3
MT
122 fi
123
124
125 ############################################################################
126 # #
127 # Checking for necessary temporary space #
128 # #
129 ############################################################################
9b0ff0a0 130 echo -ne "Checking for necessary space on disk $BASE_DEV" | tee -a $LOGFILE
df5e82b3
MT
131 BASE_DEV=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $1 }'`
132 BASE_ASPACE=`df -P -k $BASEDIR | tail -n 1 | awk '{ print $4 }'`
41921bd9 133 if (( 2048000 > $BASE_ASPACE )); then
1b273e8f
MT
134 BASE_USPACE=`du -skx $BASEDIR | awk '{print $1}'`
135 if (( 2048000 - $BASE_USPACE > $BASE_ASPACE )); then
136 beautify message FAIL
137 exiterror "Not enough temporary space available, need at least 2GB on $BASE_DEV"
138 fi
15679d9f 139 else
1b273e8f 140 beautify message DONE
df5e82b3
MT
141 fi
142
143 ############################################################################
144 # #
145 # Building Linux From Scratch system #
146 # #
147 ############################################################################
df5e82b3
MT
148 # Set umask
149 umask 022
150
151 # Set LFS Directory
152 LFS=$BASEDIR/build
153
154 # Check /tools symlink
155 if [ -h /tools ]; then
156 rm -f /tools
157 fi
158 if [ ! -a /tools ]; then
1b273e8f 159 ln -s $BASEDIR/build/tools /
df5e82b3
MT
160 fi
161 if [ ! -h /tools ]; then
1b273e8f 162 exiterror "Could not create /tools symbolic link."
df5e82b3
MT
163 fi
164
165 # Setup environment
166 set +h
167 LC_ALL=POSIX
1179dc27 168 MAKETUNING="-j6"
dd714b8a 169 export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
df5e82b3
MT
170 unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
171
172 # Make some extra directories
173 mkdir -p $BASEDIR/build/{tools,etc,usr/src} 2>/dev/null
90d372c4 174 mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys}
df5e82b3 175 mkdir -p $BASEDIR/{cache,ccache} 2>/dev/null
90d372c4
MT
176 mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}
177
178 mknod -m 600 $BASEDIR/build/dev/console c 5 1 2>/dev/null
179 mknod -m 666 $BASEDIR/build/dev/null c 1 3 2>/dev/null
df5e82b3
MT
180
181 # Make all sources and proc available under lfs build
90d372c4 182 mount --bind /dev $BASEDIR/build/dev
857d9bf2
MT
183 mount --bind /dev/pts $BASEDIR/build/dev/pts
184 mount --bind /dev/shm $BASEDIR/build/dev/shm
185 mount --bind /proc $BASEDIR/build/proc
186 mount --bind /sys $BASEDIR/build/sys
df5e82b3
MT
187 mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache
188 mount --bind $BASEDIR/ccache $BASEDIR/build/usr/src/ccache
189 mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config
190 mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc
191 mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html
192 mount --bind $BASEDIR/langs $BASEDIR/build/usr/src/langs
193 mount --bind $BASEDIR/lfs $BASEDIR/build/usr/src/lfs
194 mount --bind $BASEDIR/log $BASEDIR/build/usr/src/log
195 mount --bind $BASEDIR/src $BASEDIR/build/usr/src/src
196
119ee469 197 # This is a temporary hack!!!
6b8cff41
MT
198 if [ ! -f /tools/bin/hostname ]; then
199 cp -f /bin/hostname /tools/bin/hostname 2>/dev/null
200 fi
119ee469 201
df5e82b3
MT
202 # Run LFS static binary creation scripts one by one
203 export CCACHE_DIR=$BASEDIR/ccache
204 export CCACHE_HASHDIR=1
205
206 # Remove pre-install list of installed files in case user erase some files before rebuild
207 rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null
208}
209
df5e82b3
MT
210buildtoolchain() {
211 LOGFILE="$BASEDIR/log/_build.toolchain.log"
212 export LOGFILE
df5e82b3
MT
213 ORG_PATH=$PATH
214 NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
215 export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
216 lfsmake1 ccache
15679d9f
MT
217 lfsmake1 binutils PASS=1
218 lfsmake1 gcc PASS=1
df5e82b3 219 export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
dd714b8a
MT
220 lfsmake1 linux-libc-header
221 lfsmake1 glibc
9b0ff0a0 222 lfsmake1 cleanup-toolchain PASS=1
df5e82b3
MT
223 lfsmake1 tcl
224 lfsmake1 expect
df5e82b3 225 lfsmake1 dejagnu
15679d9f
MT
226 lfsmake1 gcc PASS=2
227 lfsmake1 binutils PASS=2
dd714b8a
MT
228 lfsmake1 ncurses
229 lfsmake1 bash
df5e82b3 230 lfsmake1 bzip2
dd714b8a 231 lfsmake1 coreutils
df5e82b3
MT
232 lfsmake1 diffutils
233 lfsmake1 findutils
dd714b8a 234 lfsmake1 gawk
df5e82b3 235 lfsmake1 gettext
dd714b8a
MT
236 lfsmake1 grep
237 lfsmake1 gzip
238 lfsmake1 m4
239 lfsmake1 make
df5e82b3 240 lfsmake1 patch
dd714b8a
MT
241 lfsmake1 perl
242 lfsmake1 sed
df5e82b3
MT
243 lfsmake1 tar
244 lfsmake1 texinfo
df5e82b3 245 lfsmake1 util-linux
9b0ff0a0 246 lfsmake1 cleanup-toolchain PASS=2
df5e82b3
MT
247 export PATH=$ORG_PATH
248}
249
250buildbase() {
251 LOGFILE="$BASEDIR/log/_build.base.log"
252 export LOGFILE
df5e82b3 253 lfsmake2 stage2
9b0ff0a0 254 lfsmake2 linux-libc-header
df5e82b3
MT
255 lfsmake2 man-pages
256 lfsmake2 glibc
9b0ff0a0 257 lfsmake2 cleanup-toolchain PASS=3
df5e82b3
MT
258 lfsmake2 binutils
259 lfsmake2 gcc
9b0ff0a0 260 lfsmake2 berkeley
df5e82b3 261 lfsmake2 coreutils
df5e82b3 262 lfsmake2 iana-etc
df5e82b3
MT
263 lfsmake2 m4
264 lfsmake2 bison
9b0ff0a0
MT
265 lfsmake2 ncurses
266 lfsmake2 procps
df5e82b3 267 lfsmake2 sed
9b0ff0a0 268 lfsmake2 libtool
df5e82b3 269 lfsmake2 perl
9b0ff0a0
MT
270 lfsmake2 readline
271 lfsmake2 zlib
df5e82b3
MT
272 lfsmake2 autoconf
273 lfsmake2 automake
274 lfsmake2 bash
df5e82b3
MT
275 lfsmake2 bzip2
276 lfsmake2 diffutils
df5e82b3 277 lfsmake2 e2fsprogs
65998e0a 278 lfsmake2 ed
9b0ff0a0
MT
279 lfsmake2 file
280 lfsmake2 findutils
281 lfsmake2 flex
9b0ff0a0
MT
282 lfsmake2 gawk
283 lfsmake2 gettext
284 lfsmake2 grep
285 lfsmake2 groff
df5e82b3 286 lfsmake2 gzip
9b0ff0a0
MT
287 lfsmake2 inetutils
288 lfsmake2 iproute2
289 lfsmake2 kbd
290 lfsmake2 less
44254afd 291 lfsmake2 libaal
df5e82b3 292 lfsmake2 make
9b0ff0a0
MT
293 lfsmake2 man
294 lfsmake2 mktemp
df5e82b3 295 lfsmake2 modutils
65f8f30f 296 lfsmake2 mtd
65998e0a 297 lfsmake2 net-tools
df5e82b3 298 lfsmake2 patch
df5e82b3 299 lfsmake2 psmisc
44254afd 300 lfsmake2 reiser4progs
df5e82b3
MT
301 lfsmake2 shadow
302 lfsmake2 sysklogd
303 lfsmake2 sysvinit
304 lfsmake2 tar
90d372c4
MT
305 lfsmake2 texinfo
306 lfsmake2 udev
df5e82b3 307 lfsmake2 util-linux
90d372c4 308 lfsmake2 vim
44254afd 309 lfsmake2 grub
df5e82b3
MT
310}
311
15679d9f 312buildipfire() {
907cd036 313 LOGFILE="$BASEDIR/log/_build.ipfire.log"
df5e82b3 314 export LOGFILE
15679d9f 315 ipfiremake configroot
dc8b9670 316 ipfiremake backup
15679d9f
MT
317 ipfiremake dhcp
318 ipfiremake dhcpcd
319 ipfiremake libusb
320 ipfiremake libpcap
15679d9f
MT
321 ipfiremake ppp
322 ipfiremake rp-pppoe
323 ipfiremake unzip
3a1019f6 324 ipfiremake linux SMP=1
552b817b 325 ipfiremake ipp2p SMP=1
dd001658 326 ipfiremake zaptel SMP=1
bb565aa4
AF
327 ipfiremake r8169 SMP=1
328 ipfiremake r8168 SMP=1
85e27660
AF
329 ipfiremake mcs7830 SMP=1
330 ipfiremake atl1 SMP=1
231d385e 331 ipfiremake dm9601 SMP=1
2cb46e81 332 ipfiremake kqemu SMP=1
85e27660 333 ipfiremake sane KMOD=1 SMP=1
c3e36980 334 ipfiremake linux
552b817b 335 ipfiremake ipp2p
119f6ad3 336 ipfiremake zaptel
bb565aa4
AF
337 ipfiremake r8169
338 ipfiremake r8168
339 ipfiremake mcs7830
99b13f6e 340 ipfiremake atl1
231d385e 341 ipfiremake dm9601
2cb46e81 342 ipfiremake kqemu
85e27660 343 ipfiremake sane KMOD=1
c545beb1 344 ipfiremake pkg-config
a89770fa 345 ipfiremake linux-atm
ad9d4caf 346 ipfiremake cpio
ee78a5ef
MT
347 ipfiremake klibc
348 ipfiremake mkinitcpio
349 ipfiremake udev KLIBC=1
15679d9f
MT
350 ipfiremake expat
351 ipfiremake gdbm
352 ipfiremake gmp
c8ead4a5 353 ipfiremake pam
15679d9f 354 ipfiremake openssl
eac942d9 355 ipfiremake curl
15679d9f
MT
356 ipfiremake python
357 ipfiremake libnet
27b8cc24 358 ipfiremake libidn
ddac6087 359 ipfiremake libjpeg
15679d9f
MT
360 ipfiremake libpng
361 ipfiremake libtiff
fd3e7da0 362 ipfiremake libart
9594506f 363 ipfiremake freetype
15679d9f
MT
364 ipfiremake gd
365 ipfiremake popt
411afd1f 366 ipfiremake pcre
15679d9f
MT
367 ipfiremake slang
368 ipfiremake newt
fd3e7da0 369 ipfiremake libcap
15679d9f 370 ipfiremake pciutils
51f3b7f5 371 ipfiremake usbutils
15679d9f 372 ipfiremake libxml2
c6c9630e 373 ipfiremake libxslt
6b8cff41 374 ipfiremake BerkeleyDB
15679d9f 375 ipfiremake mysql
411afd1f 376 ipfiremake cyrus-sasl
15679d9f
MT
377 ipfiremake openldap
378 ipfiremake apache2
379 ipfiremake php
a10ae6cc 380 ipfiremake apache2 PASS=C
15679d9f
MT
381 ipfiremake arping
382 ipfiremake beep
383 ipfiremake bind
15679d9f
MT
384 ipfiremake cdrtools
385 ipfiremake dnsmasq
386 ipfiremake dosfstools
444973a4 387 ipfiremake squashfstools
72d80898 388 ipfiremake reiserfsprogs
e0c749da 389 ipfiremake xfsprogs
93afd047 390 ipfiremake sysfsutils
8e055e65 391 ipfiremake fuse
d02350a2 392 ipfiremake ntfs-3g
15679d9f
MT
393 ipfiremake ethtool
394 ipfiremake ez-ipupdate
395 ipfiremake fcron
e3670217 396 ipfiremake perl-GD
330345c2 397 ipfiremake GD-Graph
786f2c8a 398 ipfiremake GD-TextUtil
15679d9f
MT
399 ipfiremake gnupg
400 ipfiremake hdparm
f9956330 401 ipfiremake sdparm
7861f575 402 ipfiremake mtools
15679d9f 403 ipfiremake initscripts
406f019f 404 ipfiremake whatmask
15679d9f 405 ipfiremake iptables
490256d5 406 ipfiremake libupnp
552b817b 407 ipfiremake ipp2p IPT=1
490256d5 408 ipfiremake linux-igd
15679d9f
MT
409 ipfiremake ipac-ng
410 ipfiremake ipaddr
15679d9f 411 ipfiremake iptstate
fd3e7da0 412 ipfiremake iputils
15679d9f 413 ipfiremake l7-protocols
8bba2965 414 ipfiremake mISDN
83bac7f3 415 ipfiremake capi4k-utils
93afd047 416 ipfiremake hwdata
72d80898 417 ipfiremake kudzu
15679d9f
MT
418 ipfiremake logrotate
419 ipfiremake logwatch
15679d9f 420 ipfiremake misc-progs
15679d9f 421 ipfiremake nano
15679d9f
MT
422 ipfiremake nasm
423 ipfiremake URI
424 ipfiremake HTML-Tagset
425 ipfiremake HTML-Parser
426 ipfiremake Compress-Zlib
427 ipfiremake Digest
428 ipfiremake Digest-SHA1
429 ipfiremake Digest-HMAC
430 ipfiremake libwww-perl
431 ipfiremake Net-DNS
432 ipfiremake Net-IPv4Addr
433 ipfiremake Net_SSLeay
434 ipfiremake IO-Stringy
435 ipfiremake Unix-Syslog
436 ipfiremake Mail-Tools
437 ipfiremake MIME-Tools
438 ipfiremake Net-Server
439 ipfiremake Convert-TNEF
440 ipfiremake Convert-UUlib
441 ipfiremake Archive-Tar
442 ipfiremake Archive-Zip
443 ipfiremake Text-Tabs+Wrap
444 ipfiremake Locale-Country
93afd047 445 ipfiremake XML-Parser
c5568d64 446 ipfiremake glib
15679d9f
MT
447 ipfiremake GeoIP
448 ipfiremake fwhits
449 ipfiremake noip_updater
450 ipfiremake ntp
15679d9f
MT
451 ipfiremake openssh
452 ipfiremake openswan
15679d9f
MT
453 ipfiremake rrdtool
454 ipfiremake setserial
455 ipfiremake setup
456 ipfiremake snort
8a5604bf 457 ipfiremake oinkmaster
15679d9f
MT
458 ipfiremake squid
459 ipfiremake squid-graph
460 ipfiremake squidguard
069ae085 461 ipfiremake calamaris
6f00de0d 462 ipfiremake tcpdump
15679d9f
MT
463 ipfiremake traceroute
464 ipfiremake vlan
465 ipfiremake wireless
466 ipfiremake libsafe
15679d9f 467 ipfiremake pakfire
15679d9f 468 ipfiremake java
15679d9f
MT
469 ipfiremake spandsp
470 ipfiremake lzo
471 ipfiremake openvpn
15679d9f 472 ipfiremake pammysql
15679d9f 473 ipfiremake cups
fccb3371
MT
474 ipfiremake ghostscript
475 ipfiremake foomatic
2231d107 476 ipfiremake hplip
15679d9f
MT
477 ipfiremake samba
478 ipfiremake sudo
479 ipfiremake mc
480 ipfiremake wget
15679d9f
MT
481 ipfiremake bridge-utils
482 ipfiremake screen
483 ipfiremake hddtemp
484 ipfiremake smartmontools
485 ipfiremake htop
15679d9f 486 ipfiremake postfix
15679d9f 487 ipfiremake fetchmail
5ad5a6bc 488 ipfiremake cyrus-imapd
58493e1e 489 ipfiremake openmailadmin
15679d9f 490 ipfiremake clamav
15679d9f 491 ipfiremake spamassassin
fd3e7da0 492 ipfiremake amavisd
0708852c 493 ipfiremake alsa
15679d9f 494 ipfiremake mpg123
a28fdc01 495 ipfiremake mpfire
6c98857b 496 ipfiremake guardian
67081922 497 ipfiremake libid3tag
15679d9f
MT
498 ipfiremake libmad
499 ipfiremake libogg
500 ipfiremake libvorbis
501 ipfiremake lame
15679d9f 502 ipfiremake sox
a6931e7e 503 ipfiremake libshout
0dde24fa
MT
504 ipfiremake icecast
505 ipfiremake icegenerator
71043200 506 ipfiremake mpd
f86b0cc3 507 ipfiremake mpc
0dde24fa
MT
508 ipfiremake xvid
509 ipfiremake libmpeg2
510 ipfiremake videolan
0708852c 511 ipfiremake libpri
0708852c 512 ipfiremake asterisk
15679d9f 513 ipfiremake gnump3d
eac942d9 514 ipfiremake libsigc++
15679d9f
MT
515 ipfiremake applejuice
516 ipfiremake ocaml
517 ipfiremake mldonkey
eac942d9
MT
518 ipfiremake libtorrent
519 ipfiremake rtorrent
06209efc 520 ipfiremake ipfireseeder
15679d9f
MT
521 ipfiremake rsync
522 ipfiremake tcpwrapper
523 ipfiremake portmap
524 ipfiremake nfs
525 ipfiremake nmap
526 ipfiremake mbmon
15679d9f 527 ipfiremake ncftp
15679d9f 528 ipfiremake etherwake
06da1292 529 ipfiremake bwm-ng
1a8688ba
MT
530 ipfiremake tripwire
531 ipfiremake sysstat
a08c3a2e 532 ipfiremake vsftpd
51f3b7f5 533 ipfiremake which
186e3d2c 534 ipfiremake lsof
c5e5a5aa 535 ipfiremake centerim
d83f547d 536 ipfiremake br2684ctl
bb565aa4 537 ipfiremake pcmciautils
a332b303
CS
538 ipfiremake collectd
539 ipfiremake lcd4linux
e0c749da
MT
540 ipfiremake neon
541 ipfiremake subversion
00b216e6 542 ipfiremake tcptrack
03129a5b 543 ipfiremake teamspeak
3495f7ba 544 ipfiremake elinks
323208ea 545 ipfiremake igmpproxy
bc38ecd0
MT
546 ipfiremake sdl
547 ipfiremake qemu
08fc1a19 548 ipfiremake sane
b332d4ea
AF
549 ipfiremake netpbm
550 ipfiremake phpSANE
f8abcd46 551 ipfiremake tunctl
0bd7d00b 552 ipfiremake nagios
eb20e136
AF
553 ipfiremake ebtables
554 ipfiremake arptables
debeaeaa
AF
555 ipfiremake fontconfig
556 ipfiremake freefont
557 ipfiremake vdr
77a2f0af 558 ipfiremake git
df5e82b3
MT
559}
560
561buildinstaller() {
562 # Run installer scripts one by one
563 LOGFILE="$BASEDIR/log/_build.installer.log"
564 export LOGFILE
0afc6d83 565 ipfiremake syslinux
4dc82852
MT
566 ipfiremake as86
567 ipfiremake mbr
fd0763dc 568 ipfiremake memtest
bc9f0c12
MT
569 installmake linux-libc-header
570 installmake binutils
571 ipfiremake uClibc PASS=1
572 ipfiremake gcc INST=1
573 installmake uClibc PASS=2
574 installmake gcc INST=2
575 installmake uClibc PASS=3
df5e82b3 576 installmake busybox
c66941dd 577 installmake udev
33634aa8
MT
578 installmake slang
579 installmake newt
72d80898 580 installmake gettext
33634aa8
MT
581 installmake kbd
582 installmake popt
33634aa8 583 installmake sysvinit
df5e82b3 584 installmake misc-progs
44254afd
MT
585 installmake libaal
586 installmake reiser4progs
89069053 587 installmake reiserfsprogs
a6316ce4 588 installmake sysfsutils
df5e82b3 589 installmake util-linux
df5e82b3 590 installmake pciutils
c5568d64 591 installmake zlib
65f8f30f 592 installmake mtd
c78a77eb 593 installmake wget
93afd047 594 installmake hwdata
fcb5057d 595 installmake kudzu
ff632ec4 596 installmake pcmciautils
df5e82b3 597 installmake installer
df5e82b3 598 installmake initrd
df5e82b3
MT
599}
600
601buildpackages() {
602 LOGFILE="$BASEDIR/log/_build.packages.log"
603 export LOGFILE
604 echo "... see detailed log in _build.*.log files" >> $LOGFILE
0fbb45e9 605
edd536b6 606 installmake strip
df5e82b3
MT
607
608 # Generating list of packages used
0fbb45e9 609 echo -n "Generating packages list from logs" | tee -a $LOGFILE
df5e82b3
MT
610 rm -f $BASEDIR/doc/packages-list
611 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
612 if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
7471f6ab 613 echo "* `basename $i`" >>$BASEDIR/doc/packages-list
df5e82b3
MT
614 fi
615 done
7471f6ab 616 echo "== List of softwares used to build $NAME Version: $VERSION ==" > $BASEDIR/doc/packages-list.txt
4fe9acb2 617 grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$\|.tgz$\|-config$\|_missing_rootfile$\|install1$\|install2$\|pass1$\|pass2$\|pass3$' \
df5e82b3
MT
618 $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
619 rm -f $BASEDIR/doc/packages-list
c9673262 620 # packages-list.txt is ready to be displayed for wiki page
0fbb45e9 621 beautify message DONE
df5e82b3 622
9607771a 623 # Create images for install
74dbbc36
MT
624 ipfiremake cdrom ED=full
625
4dc82852 626 # Check if there is a loop device for building in virtual environments
eedc26d9 627 if [ -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
4dc82852
MT
628 ipfiremake usb-stick
629 fi
4dc82852 630 mv $LFS/install/images/{*.iso,*.tgz,*.img.gz} $BASEDIR >> $LOGFILE 2>&1
c9673262 631
0d909a4a 632 ipfirepackages
e67a57fe
MT
633
634 # Cleanup
635 stdumount
636 rm -rf $BASEDIR/build/tmp/*
637
638 # Generating total list of files
0d909a4a 639 echo -n "Generating files list from logs" | tee -a $LOGFILE
e67a57fe
MT
640 rm -f $BASEDIR/log/FILES
641 for i in `ls -1tr $BASEDIR/log/[^_]*`; do
642 if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
643 echo "##" >>$BASEDIR/log/FILES
644 echo "## `basename $i`" >>$BASEDIR/log/FILES
645 echo "##" >>$BASEDIR/log/FILES
646 cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES
647 fi
648 done
0d909a4a 649 beautify message DONE
e67a57fe
MT
650
651 cd $PWD
e67a57fe
MT
652}
653
654ipfirepackages() {
a5997a4c 655 ipfiremake core-updates
fe7fe395 656 for i in $(ls -1 $BASEDIR/config/rootfiles/packages); do
453b418b
MT
657 if [ -e $BASEDIR/lfs/$i ]; then
658 ipfiredist $i
659 else
660 echo -n $i
661 beautify message SKIP
662 fi
fe7fe395 663 done
78331e30 664 test -d $BASEDIR/packages || mkdir $BASEDIR/packages
5c8cfc99 665 mv -f $LFS/install/packages/* $BASEDIR/packages >> $LOGFILE 2>&1
483f59cd 666 rm -rf $BASEDIR/build/install/packages/*
df5e82b3
MT
667}
668
669# See what we're supposed to do
670case "$1" in
671build)
9729e787 672 clear
df5e82b3 673 BUILDMACHINE=`uname -m`
712d859c 674 PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1`
df5e82b3 675 #only restore on a clean disk
9b0ff0a0 676 if [ ! -f log/cleanup-toolchain-2-tools ]; then
df5e82b3 677 if [ ! -n "$PACKAGE" ]; then
15679d9f 678 beautify build_stage "Full toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
df5e82b3
MT
679 prepareenv
680 buildtoolchain
681 else
682 PACKAGENAME=${PACKAGE%.tar.gz}
15679d9f 683 beautify build_stage "Packaged toolchain compilation"
df5e82b3
MT
684 if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
685 tar zxf $PACKAGE
686 prepareenv
687 else
688 exiterror "$PACKAGENAME md5 did not match, check downloaded package"
689 fi
690 fi
691 else
9729e787
MT
692 echo -n "Using installed toolchain" | tee -a $LOGFILE
693 beautify message SKIP
df5e82b3
MT
694 prepareenv
695 fi
5cfe86e6 696
7ab7a9b4 697 beautify build_start
0b59f25c 698 beautify build_stage "Building LFS"
df5e82b3 699 buildbase
15679d9f 700
0b59f25c 701 beautify build_stage "Building IPFire"
15679d9f 702 buildipfire
5cfe86e6
HS
703
704 # Setzen des IPFire Builds
5a4cd5a8
AF
705 if [ "$SVN_REVISION" ]; then
706 echo "$SVN_REVISION" > $BASEDIR/build/var/ipfire/firebuild
5cfe86e6 707 else
e57bc1fd 708 echo "_(OvO)_" > $BASEDIR/build/var/ipfire/firebuild
5cfe86e6
HS
709 fi
710
0b59f25c 711 beautify build_stage "Building installer"
df5e82b3 712 buildinstaller
15679d9f 713
0b59f25c 714 beautify build_stage "Building packages"
df5e82b3 715 buildpackages
7ab7a9b4 716 beautify build_end
df5e82b3
MT
717 ;;
718shell)
719 # enter a shell inside LFS chroot
720 # may be used to changed kernel settings
721 prepareenv
722 entershell
723 ;;
724changelog)
d1dd6669 725 echo -n "Loading new Changelog from SVN: "
223ad6a4 726 svn log http://svn.ipfire.org/svn/ipfire > doc/ChangeLog
a50d04ab 727 beautify message DONE
df5e82b3 728 ;;
df5e82b3 729clean)
a50d04ab 730 echo -en "${BOLD}Cleaning build directory...${NORMAL}"
df5e82b3
MT
731 for i in `mount | grep $BASEDIR | sed 's/^.*loop=\(.*\))/\1/'`; do
732 $LOSETUP -d $i 2>/dev/null
733 done
734 for i in `mount | grep $BASEDIR | cut -d " " -f 1`; do
735 umount $i
736 done
737 stdumount
738 for i in `seq 0 7`; do
739 if ( losetup /dev/loop${i} 2>/dev/null | grep -q "/install/images" ); then
740 umount /dev/loop${i} 2>/dev/null;
741 losetup -d /dev/loop${i} 2>/dev/null;
742 fi;
743 done
744 rm -rf $BASEDIR/build
745 rm -rf $BASEDIR/cdrom
f9315063 746 rm -rf $BASEDIR/packages
df5e82b3 747 rm -rf $BASEDIR/log
df5e82b3
MT
748 if [ -h /tools ]; then
749 rm -f /tools
750 fi
a50d04ab 751 beautify message DONE
df5e82b3 752 ;;
c3db995c 753downloadsrc)
df5e82b3
MT
754 if [ ! -d $BASEDIR/cache ]; then
755 mkdir $BASEDIR/cache
756 fi
757 mkdir -p $BASEDIR/log
857d9bf2 758 echo -e "${BOLD}Preload all source files${NORMAL}" | tee -a $LOGFILE
df5e82b3
MT
759 FINISHED=0
760 cd $BASEDIR/lfs
761 for c in `seq $MAX_RETRIES`; do
762 if (( FINISHED==1 )); then
763 break
764 fi
765 FINISHED=1
766 cd $BASEDIR/lfs
767 for i in *; do
768 if [ -f "$i" -a "$i" != "Config" ]; then
e22c7973 769 echo -ne "Loading $i"
df5e82b3
MT
770 make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
771 if [ $? -ne 0 ]; then
e22c7973 772 beautify message FAIL
df5e82b3
MT
773 FINISHED=0
774 else
775 if [ $c -eq 1 ]; then
e22c7973 776 beautify message DONE
df5e82b3
MT
777 fi
778 fi
779 fi
780 done
781 done
e22c7973 782 echo -e "${BOLD}***Verifying md5sums${NORMAL}"
df5e82b3
MT
783 ERROR=0
784 for i in *; do
785 if [ -f "$i" -a "$i" != "Config" ]; then
786 make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
787 if [ $? -ne 0 ]; then
e22c7973
MT
788 echo -ne "MD5 difference in lfs/$i"
789 beautify message FAIL
df5e82b3
MT
790 ERROR=1
791 fi
792 fi
793 done
794 if [ $ERROR -eq 0 ]; then
e22c7973
MT
795 echo -ne "${BOLD}all files md5sum match${NORMAL}"
796 beautify message DONE
797 else
798 echo -ne "${BOLD}not all files were correctly download${NORMAL}"
799 beautify message FAIL
df5e82b3 800 fi
e22c7973 801 cd - >/dev/null 2>&1
df5e82b3 802 ;;
df5e82b3 803toolchain)
9729e787 804 clear
df5e82b3 805 prepareenv
15679d9f 806 beautify build_stage "Toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
df5e82b3
MT
807 buildtoolchain
808 BUILDMACHINE=`uname -m`
809 echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
712d859c
MT
810 test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
811 cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
df5e82b3
MT
812 build/{bin,etc,usr/bin,usr/local} \
813 build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
814 log >> $LOGFILE
712d859c
MT
815 md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz \
816 > cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.md5
df5e82b3
MT
817 stdumount
818 ;;
819gettoolchain)
820 BUILDMACHINE=`uname -m`
821 # arbitrary name to be updated in case of new toolchain package upload
c6cb9d25 822 PACKAGE=$SNAME-$VERSION-toolchain-$BUILDMACHINE
712d859c 823 if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.gz ]; then
5bd13f01 824 URL_TOOLCHAIN=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'`
712d859c
MT
825 test -d $BASEDIR/cache/toolchains || mkdir $BASEDIR/cache/toolchains
826 echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
827 cd $BASEDIR/cache/toolchains
5bd13f01 828 wget $URL_TOOLCHAIN/$PACKAGE.tar.gz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
712d859c
MT
829 if [ $? -ne 0 ]; then
830 echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
40a4ea4c 831 else
712d859c
MT
832 if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
833 echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
834 else
835 exiterror "$PACKAGE.md5 did not match, check downloaded package"
836 fi
40a4ea4c 837 fi
712d859c
MT
838 else
839 echo "Toolchain is already downloaded. Exiting..."
df5e82b3
MT
840 fi
841 ;;
15679d9f 842othersrc)
ce56e927 843 prepareenv
15679d9f 844 echo -ne "`date -u '+%b %e %T'`: Build sources iso for $MACHINE" | tee -a $LOGFILE
ce56e927
MT
845 chroot $LFS /tools/bin/env -i HOME=/root \
846 TERM=$TERM PS1='\u:\w\$ ' \
847 PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
848 VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" MACHINE=$MACHINE \
849 /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
850 mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1
15679d9f
MT
851 if [ $? -eq "0" ]; then
852 beautify message DONE
853 else
854 beautify message FAIL
855 fi
ce56e927
MT
856 stdumount
857 ;;
c6cb9d25
MT
858svn)
859 case "$2" in
860 update|up)
cc0e56be 861 # clear
15679d9f 862 echo -ne "Loading the latest source files...\n"
7471f6ab
MT
863 if [ $3 ]; then
864 svn update -r $3 | tee -a $PWD/log/_build.svn.update.log
865 else
866 svn update | tee -a $PWD/log/_build.svn.update.log
867 fi
15679d9f
MT
868 if [ $? -eq "0" ]; then
869 beautify message DONE
c6cb9d25 870 else
15679d9f 871 beautify message FAIL
c6cb9d25
MT
872 exit 1
873 fi
15679d9f 874 echo -ne "Writing the svn-info to a file"
c6cb9d25 875 svn info > $PWD/svn_status
15679d9f
MT
876 if [ $? -eq "0" ]; then
877 beautify message DONE
c6cb9d25 878 else
15679d9f 879 beautify message FAIL
c6cb9d25
MT
880 exit 1
881 fi
712d859c 882 chmod 755 $0
cc0e56be 883 exit 0
c6cb9d25
MT
884 ;;
885 commit|ci)
886 clear
6b8cff41
MT
887 if [ -f /usr/bin/mcedit ]; then
888 export EDITOR=/usr/bin/mcedit
73d9a908
MT
889 fi
890 if [ -f /usr/bin/nano ]; then
891 export EDITOR=/usr/bin/nano
6b8cff41
MT
892 fi
893 echo -ne "Selecting editor $EDITOR..."
894 beautify message DONE
d79b46cb 895 if [ -e /sbin/yast ]; then
028698e8
MT
896 if [ "`echo $SVN_REVISION | cut -c 3`" -eq "0" ]; then
897 $0 changelog
898 fi
d79b46cb 899 fi
8a5f0f44 900 update_langs
15679d9f 901 svn commit
c6cb9d25 902 $0 svn up
1065bfea
MT
903 if [ -n "$FTP_CACHE_URL" ]; then
904 $0 uploadsrc
905 fi
c6cb9d25
MT
906 ;;
907 dist)
7471f6ab
MT
908 if [ $3 ]; then
909 SVN_REVISION=$3
910 fi
911 if [ -f ipfire-source-r$SVN_REVISION.tar.gz ]; then
912 echo -ne "REV $SVN_REVISION: SKIPPED!\n"
913 exit 0
914 fi
915 echo -en "REV $SVN_REVISION: Downloading..."
223ad6a4
MT
916 svn export http://svn.ipfire.org/svn/ipfire/trunk ipfire-source/ --force > /dev/null
917 svn log http://svn.ipfire.org/svn/ipfire/trunk -r 1:$SVN_REVISION > ipfire-source/Changelog
918 #svn info http://svn.ipfire.org/svn/ipfire/trunk -r $SVN_REVISION > ipfire-source/svn_status
15679d9f
MT
919 evaluate 1
920
7471f6ab
MT
921 echo -en "REV $SVN_REVISION: Compressing files..."
922 if [ -e ipfire-source/trunk/make.sh ]; then
923 chmod 755 ipfire-source/trunk/make.sh
924 fi
9dc02b38 925 tar cfz ipfire-source-r$SVN_REVISION.tar.gz ipfire-source
15679d9f 926 evaluate 1
7471f6ab 927 echo -en "REV $SVN_REVISION: Cleaning up..."
c6cb9d25 928 rm ipfire-source/ -r
15679d9f 929 evaluate 1
7471f6ab 930 ;;
028698e8 931 diff|di)
1a8688ba 932 update_langs
15679d9f 933 echo -ne "Make a local diff to last svn revision"
c6cb9d25 934 svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff
15679d9f 935 evaluate 1
c6cb9d25 936 echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff"
bf7c473f 937 svn status
c6cb9d25
MT
938 ;;
939 esac
f9315063 940 ;;
15679d9f
MT
941uploadsrc)
942 PWD=`pwd`
943 cd $BASEDIR/cache/
944 echo -e "Uploading cache to ftp server:"
fd1b8061 945 ncftpls -u $FTP_CACHE_USER -p $FTP_CACHE_PASS ftp://$FTP_CACHE_URL/$FTP_CACHE_PATH/ > /tmp/ftplist
15679d9f 946 for i in *; do
fd1b8061
MT
947 if [ "$(basename $i)" == "toolchains" ]; then continue; fi
948 grep -q $(basename $i) /tmp/ftplist
0eab8e84 949 if [ "$?" -ne "0" ]; then
fd1b8061
MT
950 echo -ne "$(basename $i)"
951 ncftpput -u $FTP_CACHE_USER -p $FTP_CACHE_PASS $FTP_CACHE_URL $FTP_CACHE_PATH/ $(basename $i)
6fb8ec08 952 if [ "$?" -ne "0" ]; then
15679d9f 953 beautify message FAIL
0eab8e84
MT
954 fi
955 fi
956 done
6fb8ec08 957 rm -f /tmp/ftplist
15679d9f
MT
958 cd $PWD
959 exit 0
0eab8e84 960 ;;
cc0e56be 961upload)
b2c64f8c
MT
962 FTP_ISO_PORT=`echo "$FTP_ISO_URL" | awk -F: '{ print $2 }'`
963 FTP_ISO_URL=`echo "$FTP_ISO_URL" | awk -F: '{ print $1 }'`
964 if [ -z $FTP_ISO_PORT ]; then
965 FTP_ISO_PORT=21
966 fi
967 cat <<EOF > .ftp-commands
de2c999d 968mkdir -p $FTP_ISO_PATH$SVN_REVISION
b2c64f8c 969mkdir -p $FTP_ISO_PATH$SVN_REVISION/paks
9dc02b38
MT
970quit
971EOF
b2c64f8c
MT
972 ncftp -u $FTP_ISO_USER -p $FTP_ISO_PASS -P $FTP_ISO_PORT $FTP_ISO_URL < .ftp-commands
973 rm -f .ftp-commands
974
975 case "$2" in
976 iso)
977 echo -e "Uploading the iso to $FTP_ISO_PATH/$SVN_REVISION."
978
8f55c54e 979 md5sum ipfire-$VERSION.$MACHINE-full.iso > ipfire-$VERSION.$MACHINE-full.iso.md5
dff9df9d
MT
980 for i in svn_status ipfire-source-r$SVN_REVISION.tar.gz ipfire-$VERSION.$MACHINE-full.iso ipfire-$VERSION.$MACHINE-full.iso.md5 ipfire-$VERSION.$MACHINE-devel.iso ipfire-$VERSION.$MACHINE-devel.iso.md5; do
981 if [ -e "$i" ]; then
b2c64f8c
MT
982 ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS -P $FTP_ISO_PORT $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ $i
983 if [ "$?" -eq "0" ]; then
984 echo "The file with name $i was successfully uploaded to $FTP_ISO_URL$FTP_ISO_PATH$SVN_REVISION/."
985 else
986 echo "There was an error while uploading the file $i to the ftp server."
987 exit 1
988 fi
dff9df9d 989 fi
b2c64f8c 990 done
a4c9c660 991 rm -f ipfire-$VERSION.$MACHINE-full.iso.md5
6aae8d61 992 if [ "$3" = "--with-sources-cd" ]; then
b2c64f8c 993 ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS -P $FTP_ISO_PORT $FTP_ISO_URL $FTP_ISO_PATH/$SVN_REVISION/ ipfire-sources-cd-$VERSION.$MACHINE.iso
6aae8d61 994 fi
cc0e56be
MT
995 ;;
996 paks)
b2c64f8c 997 ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS -P $FTP_ISO_PORT $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/paks packages/*
cc0e56be 998 if [ "$?" -eq "0" ]; then
822c5bd0 999 echo -e "The packages were successfully uploaded to $FTP_ISO_URL$FTP_ISO_PATH$SVN_REVISION/."
cc0e56be
MT
1000 else
1001 echo -e "There was an error while uploading the packages to the ftp server."
712d859c 1002 exit 1
cc0e56be
MT
1003 fi
1004 ;;
1005 esac
0d0521b6 1006 ;;
cc0e56be 1007batch)
c8582074 1008 if [ "$2" = "--background" ]; then
15679d9f
MT
1009 batch_script
1010 exit $?
1011 fi
27ac55bf 1012 if [ `screen -ls | grep -q ipfire` ]; then
712d859c
MT
1013 echo "Build is already running, sorry!"
1014 exit 1
1015 else
27ac55bf
MT
1016 if [ "$2" = "--rebuild" ]; then
1017 export IPFIRE_REBUILD=1
1018 echo "REBUILD!"
1019 else
1020 export IPFIRE_REBUILD=0
1021 fi
15679d9f
MT
1022 echo -en "${BOLD}***IPFire-Batch-Build is starting...${NORMAL}"
1023 screen -dmS ipfire $0 batch --background
1024 evaluate 1
712d859c
MT
1025 exit 0
1026 fi
cc0e56be 1027 ;;
028698e8 1028watch)
15679d9f 1029 watch_screen
028698e8 1030 ;;
33634aa8
MT
1031pxe)
1032 case "$2" in
1033 start)
1034 start_tftpd
1035 ;;
1036 stop)
1037 stop_tftpd
1038 ;;
a50d04ab 1039 reload|restart)
33634aa8
MT
1040 reload_tftpd
1041 ;;
1042 esac
1043 exit 0
1044 ;;
bf7c473f
MT
1045lang)
1046 update_langs
1047 ;;
6b8cff41 1048"")
24a4a744
MT
1049 clear
1050 svn info
c3db995c 1051 select name in "Exit" "IPFIRE: Downloadsrc" "IPFIRE: Build (silent)" "IPFIRE: Watch Build" "IPFIRE: Batch" "IPFIRE: Clean" "SVN: Commit" "SVN: Update" "SVN: Status" "SVN: Diff" "LOG: Tail" "Help"
24a4a744
MT
1052 do
1053 case $name in
c3db995c
MT
1054 "IPFIRE: Downloadsrc")
1055 $0 downloadsrc
c6cb9d25
MT
1056 ;;
1057 "IPFIRE: Build (silent)")
1058 $0 build-silent
1059 ;;
1060 "IPFIRE: Watch Build")
028698e8 1061 $0 watch
c6cb9d25 1062 ;;
712d859c
MT
1063 "IPFIRE: Batch")
1064 $0 batch
1065 ;;
c6cb9d25
MT
1066 "IPFIRE: Clean")
1067 $0 clean
1068 ;;
c6cb9d25
MT
1069 "SVN: Update")
1070 $0 svn update
1071 ;;
c6cb9d25 1072 "Help")
a50d04ab 1073 echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}"
c6cb9d25
MT
1074 cat doc/make.sh-usage
1075 ;;
712d859c
MT
1076 "LOG: Tail")
1077 tail -f log/_*
1078 ;;
c6cb9d25
MT
1079 "Exit")
1080 break
1081 ;;
24a4a744
MT
1082 esac
1083 done
df5e82b3 1084 ;;
a50d04ab
MT
1085config)
1086 make_config
1087 ;;
6b8cff41 1088*)
a50d04ab 1089 echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}"
6b8cff41
MT
1090 cat doc/make.sh-usage
1091 ;;
3ea75603 1092esac