Changeset 588 in MondoRescue for trunk/tools/build2pkg


Ignore:
Timestamp:
May 29, 2006, 11:47:20 AM (14 years ago)
Author:
bcornec
Message:

merge -r 560:587 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/build2pkg

    r561 r588  
    4848
    4949export pkg=""
     50echo "Working under $TOPBUILDDIR"
    5051cd $TOPBUILDDIR
    5152
     
    6667        pkg="$pkg $pkg1"
    6768
    68         echo "Generating $p RPMS"
    6969        log=/tmp/$p-rpm.log
    7070
     
    7575            ln -sf $src SOURCES/
    7676        fi
     77        echo "Generating $p RPMS"
    7778        cd SPECS
    7879        tar xfz $src $pv/distributions/$ddir/$p.spec
     
    8687        fi
    8788        cd ..
    88     elif [  _"$dtype" = _"gentoo" ]; then
    89         echo "Gentoo"
     89    elif [  _"$dtype" = _"ebuild" ]; then
    9090        log=/tmp/$p-gentoo.log
    9191        ln -sf $src .
    92         tar xfz $src $pv/distributions/$ddir/$pv-r$TAG.ebuild
     92        tar xfz $src $pv/distributions/$ddir/$p-${VER}-r$TAG.ebuild
     93        if [ _"`grep $TOPBUILDDIR/portage /etc/make.conf`" = _"" ]; then
     94            echo "Adding $TOPBUILDDIR/portage to /etc/make.conf"
     95            echo "PORTDIR_OVERLAY=\"$TOPBUILDDIR/portage\"" >> /etc/make.conf
     96        fi
    9397
    94         ebuild $pv/distributions/$ddir/$pv-r$TAG.ebuild
     98        mkdir -p ${TOPBUILDDIR}/portage/sys-apps/$p
     99        mv $pv/distributions/$ddir/$p-${VER}-r$TAG.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p
     100        rm -rf $pv
     101
     102        cd ${TOPBUILDDIR}/portage/sys-apps/$p
     103        ebuild $p-${VER}-r$TAG.ebuild digest 2> $log 1> $log
    95104        if [ $? != 0 ]; then
    96105            cat $log
    97106            status=-1
    98107        fi
    99         rm -rf $pv
     108        ebuild $p-${VER}-r$TAG.ebuild unpack 2>> $log 1>> $log
     109        if [ $? != 0 ]; then
     110            cat $log
     111            status=-1
     112        fi
     113        ebuild $p-${VER}-r$TAG.ebuild compile 2>> $log 1>> $log
     114        if [ $? != 0 ]; then
     115            cat $log
     116            status=-1
     117        fi
     118        #ebuild $p-${VER}-r$TAG.ebuild install 2>> $log 1>> $log
     119        if [ $? != 0 ]; then
     120            cat $log
     121            status=-1
     122        fi
     123    elif [  _"$dtype" = _"deb" ]; then
     124        log=/tmp/$p-deb.log
     125        cd $TOPBUILDDIR
     126        tar xfz $src
     127        cd ${pv}*
     128        ln -s distributions/debian debian
     129        # update debian/changelog
     130        pkg-buildpackage -us -uc -rfakeroot
     131        # Et voila !
    100132    else
    101133        echo "Unknown"
Note: See TracChangeset for help on using the changeset viewer.