--- misc/scripts/shell/build.sh 2003/03/29 16:30:37 1.6 +++ misc/scripts/shell/build.sh 2004/03/20 20:08:04 1.10 @@ -4,7 +4,7 @@ # builds new-style dists from cvs source, and puts them # in a single location for download (eg. snapshots) # -# $Id: build.sh,v 1.6 2003/03/29 16:30:37 tdb Exp $ +# $Id: build.sh,v 1.10 2004/03/20 20:08:04 tdb Exp $ # base directory for staging STAGING=/u1/i-scream/staging @@ -32,8 +32,7 @@ iscreambuild() { cvs -d $CVSROOT update -dPr $TAG cvs2cl --stdout --no-wrap -r -t -w -S -g "-d $CVSROOT" -g "-q" -l "-r::$TAG" > build/ChangeLog fi - LIBRARIES= - eval `grep "LIBRARIES=" configure` + LIBRARIES=eval `grep "LIBRARIES=" configure` for LIB in $LIBRARIES; do fetchlib $LIB cp $DISTFILES/$LIB build/lib @@ -51,6 +50,7 @@ gnubuild() { SOURCEDIR=$1 DESTDIR=$2 LIBTOOL=$3 + CONFIGUREARGS=$4 cd $SOURCEDIR if [ "X$TAG" != "X" ]; then cvs -d $CVSROOT update -dPr $TAG @@ -63,7 +63,7 @@ gnubuild() { libtoolize -c fi automake -a -c - ./configure + ./configure $CONFIGUREARGS gnumake dist TARBALL=`ls *.tar.gz` mkdir -p $DESTDIR @@ -71,6 +71,22 @@ gnubuild() { gpg -abs --default-key=0x135D6B0A $DESTDIR/$TARBALL } +# standard process for a python distutils build +pydistbuild() { + SOURCEDIR=$1 + DESTDIR=$2 + cd $SOURCEDIR + if [ "X$TAG" != "X" ]; then + cvs -d $CVSROOT update -dPr $TAG + cvs2cl --stdout --no-wrap -r -t -w -S -g "-d $CVSROOT" -g "-q" -l "-r::$TAG" > ChangeLog + fi + python setup.py sdist + TARBALL=`ls dist/*.tar.gz` + mkdir -p $DESTDIR + cp $TARBALL $DESTDIR + gpg -abs --default-key=0x135D6B0A $DESTDIR/`basename $TARBALL` +} + # grab a required library off the web to maintain a local copy fetchlib() { LIB=$1 @@ -101,6 +117,9 @@ echo "+ Cleaning up" rm -Rf cms rm -Rf $BUILDS/* +# make sure our local cvs is up-to-date +/usr/local/packages/cvsup/bin/cvsup -L 2 /u1/i-scream/cvsup/supfile + # pull the latest source from our local cvs echo "+ Updating CVS" cvs -d $CVSROOT checkout cms/source @@ -131,10 +150,16 @@ for PROG in $PROGS; do gnubuild $CMSSOURCE/libstatgrab $BUILDS/libstatgrab yes ;; ihost) - gnubuild $CMSSOURCE/ihost $BUILDS/ihost no + gnubuild $CMSSOURCE/ihost $BUILDS/ihost no --with-libstatgrab-prefix=/usr/local/packages/libstatgrab ;; libukcprog) gnubuild $CMSSOURCE/libukcprog $BUILDS/libukcprog yes + ;; + idar) + gnubuild $CMSSOURCE/idar $BUILDS/idar no --with-curses-prefix=/usr/local/packages/ncurses + ;; + pystatgrab) + pydistbuild $CMSSOURCE/pystatgrab $BUILDS/libstatgrab ;; esac done