]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - make.sh
HinzugefĆ¼gt:
[ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 0d87dc9bf668ebcad932b35d638840c0a950d48a..2b94e94de656f64f4c0001d87a34f658dafbc480 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -335,6 +335,8 @@ ipcopmake() {
 
 ipfiredist() {
        if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
+         ls $BASEDIR/packages/$1* >& /dev/null
+         if [ $? -eq 1 ]; then
                echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
                cp -f $BASEDIR/src/scripts/make-packages.sh $BASEDIR/build/usr/local/bin
                chroot $LFS /tools/bin/env -i   HOME=/root \
@@ -352,11 +354,12 @@ ipfiredist() {
                if [ $? -ne 0 ]; then
                        exiterror "Packaging $1"
                fi
+         else
+               echo -e "`date -u '+%b %e %T'`: Packages with name $1 already exists!" | tee -a $LOGFILE
+         fi
        else
                exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
        fi
-#      test -d $BASEDIR/packages || mkdir $BASEDIR/packages
-#      mv -f $BASEDIR/build/paks/* $BASEDIR/packages/
        return 0
 }
 
@@ -602,6 +605,7 @@ buildipcop() {
   ipcopmake iproute2
   ipcopmake iptstate
   ipcopmake iputils
+  ipcopmake l7-protocols
   ipcopmake isapnptools
   ipcopmake isdn4k-utils
   ipcopmake kudzu
@@ -780,13 +784,6 @@ buildpackages() {
        rm -f $LFS/license.txt >> $LOGFILE 2>&1
        cd $BASEDIR
   fi
-
-#  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
-#  tar -cz -C $BASEDIR/updates/$VERSION -f $LFS/install/images/$SNAME-update-$VERSION.$MACHINE.tgz patch.tar.gz setup information
-#  rm -f $LFS/var/run/{need-depmod-$KVER,need-depmod-$KVER-smp}
   
   # Generating list of packages used
   echo "`date -u '+%b %e %T'`: Generating packages list from logs" | tee -a $LOGFILE
@@ -797,15 +794,18 @@ buildpackages() {
        fi
   done
   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$' \
+  grep -v 'configroot$\|img$\|initrd$\|initscripts$\|installer$\|install$\|ipcop$\|setup$\|pakfire$\|stage2$\|smp$\|tools$\|tools1$\|tools2$' \
        $BASEDIR/doc/packages-list | sort >> $BASEDIR/doc/packages-list.txt
   rm -f $BASEDIR/doc/packages-list
   # packages-list.txt is ready to be displayed for wiki page
 
   # Create ISO for CDRom and USB-superfloppy
   ipcopmake cdrom
+  rm -f $LFS/install/images/*usb*
   cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
 
+  ipfirepackages
+
   # Cleanup
   stdumount
   rm -rf $BASEDIR/build/tmp/*
@@ -826,6 +826,29 @@ buildpackages() {
 
 }
 
+ipfirepackages() {
+  ipfiredist applejuice
+  ipfiredist asterisk
+  ipfiredist cyrusimap
+  ipfiredist fetchmail
+  ipfiredist gnump3d
+  ipfiredist lame
+  ipfiredist libtiff
+  ipfiredist libxml2
+  ipfiredist mc
+  ipfiredist postfix
+  ipfiredist pwlib
+  ipfiredist sane
+  ipfiredist spandsp
+  ipfiredist sudo
+  ipfiredist xampp
+  ipfiredist xinetd
+  test -d $BASEDIR/packages || mkdir $BASEDIR/packages
+  mv -f $LFS/paks/*.tar.gz $LFS/paks/*.md5 $BASEDIR/packages >> $LOGFILE 2>&1
+  rm -rf $LFS/paks
+  rm -rf $BASEDIR/build/tmp/*
+}
+
 # See what we're supposed to do
 case "$1" in 
 build)
@@ -1057,6 +1080,11 @@ gettoolchain)
                fi
        fi
        ;;
+paks)
+       prepareenv
+       buildpackages
+       # ipfirepackages
+       ;;
 update)
        echo "Load the latest source-files:"
        svn update
@@ -1068,7 +1096,7 @@ commit)
        ;;
 make)
        echo "Do a complete compile:"   
-       ./make.sh prefetch && ./make.sh gettoolchain && ./make.sh build && ./make.sh paks
+       ./make.sh prefetch && ./make.sh gettoolchain && ./make.sh build
        ;;
 diff)
        echo -ne "Make a local diff to last SVN revision: "
@@ -1100,32 +1128,28 @@ sync)
        done
        rm -f ftplist
        ;;
-paks)
-       # Build IPFire packages
-       prepareenv
-       ipfiredist applejuice
-       ipfiredist asterisk
-       ipfiredist cyrusimap
-       ipfiredist fetchmail
-       ipfiredist gnump3d
-       ipfiredist lame
-       ipfiredist libtiff
-       ipfiredist libxml2
-       ipfiredist mc
-       ipfiredist postfix
-       ipfiredist pwlib
-       ipfiredist sane
-       ipfiredist spandsp
-       ipfiredist sudo
-       ipfiredist xampp
-       ipfiredist xinetd
-       test -d $BASEDIR/packages || mkdir $BASEDIR/packages
-       mv -f $LFS/paks/*.tar.gz $LFS/paks/*.md5 $BASEDIR/packages >> $LOGFILE 2>&1
-       rm -rf $LFS/paks
-       rm -rf $BASEDIR/build/tmp/*
+pub)
+       echo -e "Upload the ISO to the beta-mirror!"
+       echo -ne "Password for mirror.ipfire.org: "; read PASS
+
+       ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/beta/ | grep `svn info | grep Revision | cut -c 11-`
+       if [ "$?" -eq "1" ]; then
+                       cp $BASEDIR/ipfire-install-1.4.i386.iso $BASEDIR/ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+                       md5sum ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso > ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+                       ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
+                       ncftpput -u web3 -p $PASS mirror.ipfire.org /html/source-packages/beta/ ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso.md5
+                       if [ "$?" -eq "0" ]; then
+                               echo -e "The ISO of Revision `svn info | grep Revision | cut -c 11-` was successfully uploaded to the ftp server."
+                       else
+                               echo -e "There was an error while uploading the ISO to the ftp server."
+                       fi
+       else
+               echo -e "File with name ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso already exists on the ftp server!"
+       fi
+       rm -f ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso{,.md5}
        ;;
 *)
-       echo "Usage: $0 {build|changelog|check|checkclean|clean|commit|diff|dist|gettoolchain|make|newpak|prefetch|shell|sync|toolchain|update}"
+       echo "Usage: $0 {build|changelog|check|checkclean|clean|commit|diff|dist|gettoolchain|make|newpak|prefetch|pub|shell|sync|toolchain|update}"
        cat doc/make.sh-usage
        exit 1
        ;;