# $Id: make.sh,v 1.129.2.145 2006/02/01 07:04:09 gespinasse Exp $
#
- NAME="IPFire" # Software name
- SNAME="ipfire" # Short name
+ NAME="IPFire" # Software name
+ SNAME="ipfire" # Short name
VERSION="1.4" # Version number
- PREVIOUSTAG=IPCOP_v1_4_10_FINAL
- SLOGAN="We save your network" # Software slogan
- CONFIG_ROOT=/var/ipfire # Configuration rootdir
+# PREVIOUSTAG=IPCOP_v1_4_10_FINAL
+ SLOGAN="We secure your network" # Software slogan
+ CONFIG_ROOT=/var/ipfire # Configuration rootdir
NICE=10
- MAX_RETRIES=3 # prefetch/check loop
+ MAX_RETRIES=3 # prefetch/check loop
KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
MACHINE=`uname -m`
# Define immediately
stdumount() {
umount $BASEDIR/build/dev/pts 2>/dev/null;
- umount $BASEDIR/build/proc 2>/dev/null;
- umount $BASEDIR/build/install/mnt 2>/dev/null;
+ umount $BASEDIR/build/proc 2>/dev/null;
+ umount $BASEDIR/build/install/mnt 2>/dev/null;
umount $BASEDIR/build/usr/src/cache 2>/dev/null;
umount $BASEDIR/build/usr/src/ccache 2>/dev/null;
umount $BASEDIR/build/usr/src/config 2>/dev/null;
- umount $BASEDIR/build/usr/src/doc 2>/dev/null;
- umount $BASEDIR/build/usr/src/html 2>/dev/null;
+ umount $BASEDIR/build/usr/src/doc 2>/dev/null;
+ umount $BASEDIR/build/usr/src/html 2>/dev/null;
umount $BASEDIR/build/usr/src/langs 2>/dev/null;
- umount $BASEDIR/build/usr/src/lfs 2>/dev/null;
- umount $BASEDIR/build/usr/src/log 2>/dev/null;
- umount $BASEDIR/build/usr/src/src 2>/dev/null;
+ umount $BASEDIR/build/usr/src/lfs 2>/dev/null;
+ umount $BASEDIR/build/usr/src/log 2>/dev/null;
+ umount $BASEDIR/build/usr/src/src 2>/dev/null;
}
exiterror() {
return 0
}
+ipfiredist() {
+ if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
+ echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
+ cp -f $BASEDIR/src/scripts/make-packages.sh $BASEDIR/build/usr/sbin/
+ chroot $LFS /tools/bin/env -i HOME=/root \
+ TERM=$TERM PS1='\u:\w\$ ' \
+ PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
+ VERSION=$VERSION \
+ CONFIG_ROOT=$CONFIG_ROOT \
+ NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
+ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
+ CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
+ KVER=$KVER \
+ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
+ /bin/bash -x -c "cd /usr/src/lfs && \
+ make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
+ if [ $? -ne 0 ]; then
+ exiterror "Packaging $1"
+ fi
+ else
+ exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
+ fi
+ if [ -e $BASEDIR/packages ]; then
+ mv -f $BASEDIR/build/paks/* $BASEDIR/packages/
+ else
+ mkdir -p $BASEDIR/packages
+ mv -f $BASEDIR/build/paks/* $BASEDIR/packages/
+ fi
+ return 0
+}
+
installmake() {
if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
ipcopmake rp-pppoe
ipcopmake unzip
# Do SMP now
-# if [ 'i386' = $MACHINE ]; then
-# # abuse the SMP flag, and make an minimal installer kernel first
-# # so that the boot floppy always works.....
-# ipcopmake linux LFS_PASS=ipcop SMP=installer
-# ipcopmake linux LFS_PASS=ipcop SMP=1
-# ipcopmake 3cp4218 SMP=1
-# ipcopmake amedyn SMP=1
-# ipcopmake cxacru SMP=1
-# ipcopmake eagle SMP=1
-#
-# # These are here because they have i386 only binary libraries
-# # included in the package.
-# ipcopmake cnx_pci SMP=1
-# ipcopmake fcdsl SMP=1
-# ipcopmake fcdsl2 SMP=1
-# ipcopmake fcdslsl SMP=1
-# ipcopmake fcdslusb SMP=1
-# ipcopmake fcdslslusb SMP=1
-# ipcopmake pulsar SMP=1
-# ipcopmake unicorn SMP=1
-# fi
+ if [ 'i386' = $MACHINE ]; then
+ # abuse the SMP flag, and make an minimal installer kernel first
+ # so that the boot floppy always works.....
+ ipcopmake linux LFS_PASS=ipcop SMP=installer
+ ipcopmake linux LFS_PASS=ipcop SMP=1
+ ipcopmake 3cp4218 SMP=1
+ ipcopmake amedyn SMP=1
+ ipcopmake cxacru SMP=1
+ ipcopmake eagle SMP=1
+
+ # These are here because they have i386 only binary libraries
+ # included in the package.
+ ipcopmake cnx_pci SMP=1
+ ipcopmake fcdsl SMP=1
+ ipcopmake fcdsl2 SMP=1
+ ipcopmake fcdslsl SMP=1
+ ipcopmake fcdslusb SMP=1
+ ipcopmake fcdslslusb SMP=1
+ ipcopmake pulsar SMP=1
+ ipcopmake unicorn SMP=1
+ fi
ipcopmake linux LFS_PASS=ipcop
ipcopmake 3cp4218
ipcopmake ethtool
ipcopmake ez-ipupdate
ipcopmake fcron
- ipcopmake GD
+ ipcopmake perl-GD
ipcopmake gnupg
ipcopmake hdparm
ipcopmake ibod
ipcopmake wireless
ipcopmake libsafe
ipcopmake 3c5x9setup
- ipcopmake stund
- ipcopmake lpd
+ echo -ne "`date -u '+%b %e %T'`: Building IPFire modules \n" | tee -a $LOGFILE
+ ipcopmake wget
+ ipcopmake berkeley-DB
ipcopmake xampp
+ ipcopmake bridge-utils
ipcopmake pam
+ ipcopmake pammysql
+ ipcopmake saslauthd PASS=1
+ ipcopmake openldap
+ ipcopmake saslauthd PASS=2
+ ipcopmake postfix
+ ipcopmake stund
+ ipcopmake lpd
+ ipcopmake pwlib
+ ipcopmake openh323
+# wget http://www.guzu.net/linux/hddtemp.db && mv hddtemp.db $BASEDIR/build/etc/hddtemp.db
+ ipcopmake hddtemp
+
}
buildinstaller() {
echo "`date -u '+%b %e %T'`: Stripping files" | tee -a $LOGFILE
find $LFS/lib $LFS/usr/lib $LFS/usr/share/rrdtool-* $LFS/install ! -type l \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
! -name 'libc.so' ! -name 'libpthread.so' ! -name 'libcrypto.so.0.9.7.sha1' \
- -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
+ -ls -exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
# add -ls before -exec if you want to verify what files are stripped
find $LFS/{,s}bin $LFS/usr/{,s}bin $LFS/usr/local/{,s}bin ! -type l \
cd $BASEDIR
fi
- # Create update for this version
+# Create update for this version
# echo "`date -u '+%b %e %T'`: Building update $VERSION tgz" | tee -a $LOGFILE
# tar -cz -C $BASEDIR/build --files-from=$BASEDIR/updates/$VERSION/ROOTFILES.$MACHINE-$VERSION -f $BASEDIR/updates/$VERSION/patch.tar.gz --exclude='#*';
# chmod 755 $BASEDIR/updates/$VERSION/setup
rm -f $BASEDIR/doc/packages-list
for i in `ls -1tr $BASEDIR/log/[^_]*`; do
if [ "$i" != "$BASEDIR/log/FILES" -a -n $i ]; then
- echo "* `basename $i`" >>$BASEDIR/doc/packages-list
+ echo " * `basename $i`" >>$BASEDIR/doc/packages-list
fi
done
- echo "!!! List of softwares used to build $NAME Version:$VERSION" > $BASEDIR/doc/packages-list.txt
+ echo "====== List of softwares used to build $NAME Version: $VERSION ======" > $BASEDIR/doc/packages-list.txt
grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
$BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
rm -f $BASEDIR/doc/packages-list
# Create ISO for CDRom and USB-superfloppy
ipcopmake cdrom
cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
+
+ # Build IPFire packages
+ ipfiredist postfix
# Cleanup
stdumount
gettoolchain)
BUILDMACHINE=`uname -m`
# arbitrary name to be updated in case of new toolchain package upload
- PACKAGE=$SNAME-1.4.11-toolchain-$BUILDMACHINE
- URL_SFNET=`grep URL_SFNET lfs/Config | awk '{ print $3 }'`
+ PACKAGE=$SNAME-1.4-toolchain-$BUILDMACHINE
+ URL_IPFIRE=`grep URL_IPFIRE lfs/Config | awk '{ print $3 }'`
echo "`date -u '+%b %e %T'`: Load toolchain tar.gz for $BUILDMACHINE" | tee -a $LOGFILE
cd $BASEDIR/cache
- wget -c $URL_SFNET/ipcop/$PACKAGE.tar.gz $URL_SFNET/ipcop/$PACKAGE.md5
+ wget -c $URL_IPFIRE/toolchains/$PACKAGE.tar.gz $URL_IPFIRE/toolchains/$PACKAGE.md5
if [ $? -ne 0 ]; then
echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
else
if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
+ echo "`date -u '+%b %e %T'`: Uncompressing toolchain" | tee -a $LOGFILE
+ cd $BASEDIR && tar xvfz cache/$PACKAGE.tar.gz -C .
else
exiterror "$PACKAGE.md5 did not match, check downloaded package"
fi