Ignore:
Timestamp:
Nov 26, 2006, 10:46:08 PM (13 years ago)
Author:
Bruno Cornec
Message:

Attempt to have a working rules Debian file for mindi-busybox (2.2.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0/tools/pkg2mdv

    r921 r983  
    4343for p in $c; do
    4444    src=${TOPDIR}/${VER}-$TAG/$p-[1-9]*.tar.bz2
     45    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/'`
    4548    distro=`ls -d ${TOPDIR}/${VER}-$TAG/$p-[1-9]*/distributions/mandriva-* | tail -1`
    4649    spec=${distro}/$p.spec
    4750    echo "Updating Mandriva package in $SVNMDV/$p"
    48     mkdir -p $SVNMDV/$p/SOURCES $SVNMDV/$p/SPECS
    49     rm -f $SVNMDV/$p/SOURCES/$p-*.tar.bz2 $SVNMDV/$p/SPECS/$p.spec
    50     cp -a $src $SVNMDV/$p/SOURCES
    51     cp -a $spec $SVNMDV/$p/SPECS
     51    cd $SVNMDV/$p
     52    mkdir -p SOURCES SPECS
     53    echo "Modifying $oldver => $newver"
     54    svn del --force SOURCES/$p-*.tar.bz2
     55    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
     61    svn add SOURCES/$p-$newver.tar.bz2
     62    cp -a $spec SPECS
    5263    # Use mkrel for mdv
    53     perl -pi -e "s/^Release:[ \t]+..*/Release:  %mkrel $TAG/" $SVNMDV/$p/SPECS/$p.spec
    54     perl -pi -e 's/ Bruno Cornec <bruno@mondorescue.org>..*/ Bruno Cornec <bcornec@mandriva.org> %{version}-%{release}/' $SVNMDV/$p/SPECS/$p.spec
     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
     66    perl -pi -e 's/mindi >= ..*,/mindi/' SPECS/$p.spec
     67    $TOOLHOME/mdv-changelog.pl SPECS/$p.spec
    5568    # Changelog management
    56     echo "Committing from $SVNMDV/$p into Mandriva's SVN"
    57     cd $SVNMDV/$p
     69    echo "Building packages"
    5870    bm
    5971    if [ $? -eq 0 ]; then
    60         rm -rf BUILD RPMS SRPMS
    61         #svn ci
     72        rm -rf BUILD RPMS SRPMS BUILDROOT
     73        echo "Committing from $SVNMDV/$p into Mandriva's SVN"
     74        svn ci -F $MONDOTMP/cmt.spec
     75        if [ $? -eq 0 ]; then
     76            svn up
     77            rm -f $MONDOTMP/cmt.spec
     78            echo "Building on Mandriva's cluster"
     79            ssh $ACCOUNT $DSTNODE "yr $p"
     80        fi
    6281    fi
    6382done
    6483
    65     #ssh chroot\${d} "for p in $aspkg; do rpm -ivh \`basename \$p\` ; rpmbuild -ba rpm/SPECS/\$s | tee -a /tmp/mondorescue.log ; done ; sudo ftp\${d}contrib \`egrep '^Wrote:' /tmp/mondorescue.log | grep -v debug | cut -d: -f2\`"
     84rm -rf $MONDOTMP
     85
    6686) 2>&1 | tee /tmp/pk2mdv.log
Note: See TracChangeset for help on using the changeset viewer.