Ignore:
Timestamp:
Jan 4, 2007, 4:50:32 PM (13 years ago)
Author:
Bruno Cornec
Message:

Integrate changes from 2.2.1 on gentoo build (now correct for mindi-busybox) and mandriva official packages (now generated correctly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/pkg2mdv

    r1011 r1034  
    1818. $TOOLHOME/distro-env
    1919. $TOOLHOME/mdv-env
     20
     21export LANGUAGE="C"
    2022
    2123# We need to get $VER and $TAG
     
    4446    src=${TOPDIR}/${VER}-$TAG/$p-[1-9]*.tar.bz2
    4547    s=`basename $src`
    46     oldver=`echo $s | sed "s/$p-\([1-9][0-9.]*\).tar.bz2/\1/"`
    47     newver=`echo $oldver | sed 's/\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2\3/'`
     48    if [ _"$p" = _"mindi-busybox" ]; then
     49        oldver=`echo $s | sed "s/$p-\([1-9][0-9.]*\).tar.bz2/\1/"`
     50        newver=$oldver
     51    else
     52        oldver=`echo $s | sed "s/$p-\([1-9][0-9.]*\).tar.bz2/\1/"`
     53        newver=`echo $oldver | sed 's/\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2\3/'`
     54    fi
    4855    distro=`ls -d ${TOPDIR}/${VER}-$TAG/$p-[1-9]*/distributions/mandriva-* | tail -1`
    4956    spec=${distro}/$p.spec
     
    5158    cd $SVNMDV/$p
    5259    mkdir -p SOURCES SPECS
    53     echo "Modifying $oldver => $newver"
    5460    svn del --force SOURCES/$p-*.tar.bz2
    5561    cp -a $src SOURCES/$p-$newver.tar.bz2
    56     tar xfj SOURCES/$p-$newver.tar.bz2
    57     mv $p-$oldver $p-$newver
    58     perl -pi -e "s/$oldver/$newver/" $p-$newver/VERSION
    59     tar cfj SOURCES/$p-$newver.tar.bz2 $p-$newver
    60     rm -rf $p-$newver
     62    cp -a $spec SPECS
     63
     64    # Case when there is a version change
     65    if [ _"$oldver" != _"$newver" ]; then
     66        echo "Modifying $oldver => $newver"
     67        tar xfj SOURCES/$p-$newver.tar.bz2
     68        mv $p-$oldver $p-$newver
     69        perl -pi -e "s/$oldver/$newver/" $p-$newver/VERSION
     70        tar cfj SOURCES/$p-$newver.tar.bz2 $p-$newver
     71        rm -rf $p-$newver
     72        perl -pi -e 's/^Version:[ \t]+([0-9])\.([0-9]+)\.([0-9]+)/Version:  $1.$2$3/' SPECS/$p.spec
     73    fi
    6174    svn add SOURCES/$p-$newver.tar.bz2
    62     cp -a $spec SPECS
    6375    # Use mkrel for mdv
    64     perl -pi -e "s/^Release:[ \t]+..*/Release:  %mkrel $tag/" SPECS/$p.spec
    65     perl -pi -e 's/^Version:[ \t]+([0-9])\.([0-9]+)\.([0-9]+)/Version:  $1.$2$3/' SPECS/$p.spec
     76    perl -pi -e "s/^Release:[ \t]+..*/Release:  %mkrel $TAG/" SPECS/$p.spec
     77    perl -pi -e "s/^Release:/Packager:  Bruno Cornec <bcornec@mandriva.org>\nRelease:/" SPECS/$p.spec
    6678    perl -pi -e 's/mindi >= ..*,/mindi/' SPECS/$p.spec
    6779    $TOOLHOME/mdv-changelog.pl SPECS/$p.spec
     
    7789            rm -f $MONDOTMP/cmt.spec
    7890            echo "Building on Mandriva's cluster"
    79             ssh -q $ACCOUNT $DSTNODE "yr $p"
     91            rev=`svn info | egrep "^Revision:" | cut -d: -f2`
     92            repsys submit svn+ssh://svn.mandriva.com/svn/packages/cooker/$p $rev
    8093        fi
    8194    fi
Note: See TracChangeset for help on using the changeset viewer.