Changeset 764 for trunk/tools/build2pkg


Ignore:
Timestamp:
Aug 8, 2006, 12:34:37 AM (14 years ago)
Author:
Bruno Cornec
Message:

merge -r728:763 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/build2pkg

    r729 r764  
    88#
    99
    10 umask 022
     10(
    1111dname=`dirname $0`
    1212prem=`echo $dname |cut -c1`
     
    5555    src=${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz
    5656    pv=`basename $src .tar.gz`
     57    PVER=`echo $pv | sed "s|^$p-||" | cut -d- -f1`
    5758
    5859    if [  _"$dtype" = _"rpm" ]; then
     
    6970        log=$TMP/$p-rpm.log
    7071
    71         if [ "$dfam" = "mandriva" || "$dfam" = "suse" ]; then
    72             echo "Generating bzip2 files ($dfam)"
    73             gzip -cd $src | bzip2 -c3 > SOURCES/$pv.tar.bz2
     72        if [ "$dfam" = "mandriva" ] || [ "$dfam" = "suse" ]; then
     73            echo "Using bzip2 files ($dfam)"
     74            ln -sf $pv.tar.bz2 SOURCES/
    7475        else
     76            echo "Using gzip files ($dfam)"
    7577            ln -sf $src SOURCES/
    7678        fi
    7779        echo "Generating $p RPMS"
    7880        cd SPECS
    79         tar xfz $src $p-${VER}/distributions/${ddir}-$dver/$p.spec
    80         mv $p-${VER}/distributions/${ddir}-$dver/$p.spec .
    81         rm -rf $p-${VER}
     81        tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/$p.spec
     82        mv $p-${PVER}/distributions/${ddir}-$dver/$p.spec .
     83        rm -rf $p-${PVER}
    8284
    83         rpmbuild -ba $p.spec 2> $log 1> $log
     85        rpmbuild -ba $p.spec 2>&1 | tee $log
    8486        if [ $? != 0 ]; then
    85             cat $log
    8687            status=-1
    8788        else
    88             egrep '^Wrote:' $log
    89             rpmlint `egrep '^Wrote:' $log | cut -d: -f2`
     89            if [ -f /usr/bin/rpmlint ]; then
     90                /usr/bin/rpmlint `egrep '^Wrote:' $log | cut -d: -f2`
     91            else
     92                echo "No rpmlint found, please install it"
     93            fi
    9094        fi
    9195        rm -rf ${TOPBUILDDIR}/BUILD/*
     
    9397    elif [  _"$dtype" = _"ebuild" ]; then
    9498        log=$TMP/$p-gentoo.log
    95         ln -sf $src .
    96         tar xfz $src $p-${VER}/distributions/${ddir}-$dver/$p-${VER}.ebuild
     99        tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/$p-${PVER}.ebuild
    97100        if [ _"`grep $TOPBUILDDIR/portage /etc/make.conf`" = _"" ]; then
    98101            echo "Adding $TOPBUILDDIR/portage to /etc/make.conf"
     
    101104
    102105        mkdir -p ${TOPBUILDDIR}/portage/sys-apps/$p
    103         mv $p-${VER}/distributions/${ddir}-$dver/$p-${VER}.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p
    104         rm -rf $p-${VER}
     106        mv $p-${PVER}/distributions/${ddir}-$dver/$p-${PVER}.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p/$p-${PVER}.ebuild
     107        rm -rf $p-${PVER}
    105108
    106109        cd ${TOPBUILDDIR}/portage/sys-apps/$p
    107         ebuild $p-${VER}.ebuild digest 2> $log 1> $log
     110        ebuild $p-${PVER}.ebuild digest 2> $log 1> $log
    108111        if [ $? != 0 ]; then
    109112            cat $log
    110113            status=-1
    111114        fi
    112         ebuild $p-${VER}.ebuild unpack 2>> $log 1>> $log
    113         if [ $? != 0 ]; then
    114             cat $log
    115             status=-1
    116         fi
    117         ebuild $p-${VER}.ebuild compile 2>> $log 1>> $log
    118         if [ $? != 0 ]; then
    119             cat $log
    120             status=-1
    121         fi
    122         #ebuild $p-${VER}.ebuild install 2>> $log 1>> $log
     115        ebuild $p-${PVER}.ebuild install 2>> $log 1>> $log
    123116        if [ $? != 0 ]; then
    124117            cat $log
     
    130123        cd $TOPBUILDDIR
    131124        tar xfz $src
    132         cd ${p}-${VER}
     125        cd ${p}-${PVER}
    133126        # point to the right debian conf
    134127        ln -s distributions/${ddir}-$dver debian
     
    149142    fi
    150143fi
     144) 2>&1 | tee /tmp/build2pkg.log
Note: See TracChangeset for help on using the changeset viewer.