Changeset 900 in MondoRescue for trunk/tools/svn2build


Ignore:
Timestamp:
Oct 24, 2006, 8:49:18 AM (18 years ago)
Author:
Bruno Cornec
Message:

Huge patch to introduce low level functions that will bw used everywhere (mr_free, mr_asprintf, ...)
Nearly linking now due to that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/svn2build

    r839 r900  
    3333
    3434# Make it safe for SVN commands
    35 cd ${BASE}/svn
     35cd ${TOOLHOME}/..
    3636
    3737for p in $c; do
    38     v=`cat ${SVNBRANCH}/$p/VERSION`
     38    v=`cat ${TOOLHOME}/../$p/VERSION`
    3939    echo "Management of $p $v-$TAG (rev $REVISION)"
    40     dest="$p-$v"
     40    dest="$DEST/$p-$v"
    4141    rm -fr $dest
    42     svn export ${SVNBRANCH}/$p $dest
     42    svn export ${TOOLHOME}/../$p $dest
    4343    echo "$REVISION" > $dest/REVISION
    4444    echo "Generating SVN log file ..."
    45     svn log -v ${SVNBRANCH}/$p > $dest/svn.log
     45    svn log -v ${TOOLHOME}/../$p > $dest/svn.log
    4646
    4747    for d in `cat ${TOOLHOME}/DISTROS`; do
     
    5151        . $TOOLHOME/distro-env
    5252
    53         # Create conf file dir
    54         mkdir -p ${BUILDDIR}
    55 
    5653        ddd=`LANG=C ; date '+%Y-%m-%d'`
    57         cat > $TMP/mondorescue.mc << EOF
     54        cat > $MONDOTMP/mondorescue.mc << EOF
    5855define(\`TTT', ${TAG})dnl
    5956define(\`RRR', ${TAG}${suf})dnl
     
    7471            echo "Using $inc customization to build SPEC file"
    7572
    76             $TOOLHOME/mkchangelog.pl $dtype $p $TMP/$p.spec
     73            $TOOLHOME/mkchangelog.pl $dtype $p $MONDOTMP/$p.spec
    7774            if [ $? -ne 0 ]; then
    7875                echo "Unable to create changelog for ${ddir}-$dver/$p.spec"
    7976                exit -1
    8077            fi
    81             m4 $TMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $TMP/$p.spec > $dest/distributions/${ddir}-$dver/$p.spec
     78            m4 $MONDOTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p.spec > $dest/distributions/${ddir}-$dver/$p.spec
    8279
    83             rm -f $TMP/$p.spec
     80            rm -f $MONDOTMP/$p.spec
    8481        elif [ "$dtype" = "ebuild" ]; then
    85             m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild
     82            m4 $MONDOTMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild
    8683        elif [ "$dtype" = "deb" ]; then
    87             # To be developped
    88             #m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p > /dev/null
    8984            cp -a $dest/distributions/$ddir/* $dest/distributions/${ddir}-$dver
    90             m4 $TMP/mondorescue.mc $dest/distributions/$ddir/rules > $dest/distributions/${ddir}-$dver/rules
     85            m4 $MONDOTMP/mondorescue.mc $dest/distributions/$ddir/rules > $dest/distributions/${ddir}-$dver/rules
    9186            $TOOLHOME/mkchangelog.pl $dtype $p $dest/distributions/${ddir}-$dver/changelog
    9287            if [ $? -ne 0 ]; then
     
    9994    done
    10095
     96    # The rest is done there
     97    cd $DEST
    10198    if [ _"`echo $p | grep mondo-doc`" != _"" ]; then
    10299        cd $dest
    103100        for f in mondorescue-howto.sgml *8; do
    104             m4 $TMP/mondorescue.mc $f > ${f}.new
     101            m4 $MONDOTMP/mondorescue.mc $f > ${f}.new
    105102            mv ${f}.new $f
    106103        done
     
    117114
    118115    if [ _"`echo $p | grep -vE 'kernel|busybox' | grep mindi`" != _"" ]; then
    119         v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
     116        v1=`cat ${TOOLHOME}/../mondo-doc/VERSION`
    120117        if [ ! -d mondo-doc-$v1 ]; then
    121118            echo "mondo-doc should be created before $p"
    122119            exit -1
    123120        fi
    124         (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$dest)
     121        (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v)
    125122        rm -f $dest/rootfs/sbin/parted2fdisk-ia64
    126123    fi
    127124    if [ "`echo $p | grep -v doc | grep  mondo`" != "" ]; then
    128         v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
     125        v1=`cat ${TOOLHOME}/../mondo-doc/VERSION`
    129126        if [ ! -d mondo-doc-$v1 ]; then
    130127            echo "mondo-doc should be created before $p"
    131128            exit -1
    132129        fi
    133         (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$dest/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$dest/docs/man)
     130        (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$p-$v/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v/docs/man)
    134131        (cd $dest ; echo "Bootstraping mondo ... " ; ./bootstrap)
    135132    fi
     
    137134    # Finally creates the tar files
    138135    echo -n "Creating $p tar files (gzip... "
    139     tar cfphz ${DEST}/$p-$v.tar.gz $dest
     136    tar cfphz ${DEST}/$p-$v.tar.gz $p-$v
    140137    echo -n " bzip2..."
    141     tar cfphj ${DEST}/$p-$v.tar.bz2 $dest
     138    tar cfphj ${DEST}/$p-$v.tar.bz2 $p-$v
    142139    echo " )"
    143140done
    144141
    145 rm -rf $TMP
     142rm -rf $MONDOTMP
    146143
    147144echo "Version delivered :"
Note: See TracChangeset for help on using the changeset viewer.