Changeset 318


Ignore:
Timestamp:
Jan 14, 2006, 10:45:10 AM (13 years ago)
Author:
bcornec
Message:
  • spec files are now under distributions as well
  • rpm build process revised accordingly
Location:
branches/2.06
Files:
2 added
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/2.06/tools/mkrpm

    r315 r318  
    3131if [ "`echo $c | grep mindi-kernel`" != "" ]; then
    3232    cd ${BASE}/svn
    33     echo "Management of mindi-kernel ${MINDI_VER}"
     33    echo "Management of mindi-kernel ${MINDI_VER}-$rev"
    3434    rm -fr mindi-kernel-${MINDI_VER}
    3535    cp -a ${VER}/mindi-kernel mindi-kernel-${MINDI_VER}
     
    3838    find mindi-kernel-${MINDI_VER} -type f -name '*~' | xargs rm -rf
    3939    mkdir -p ${TOPDIR}/SOURCES
     40
     41    echo "Creating mindi-kernel tar files"
    4042    tar cvfhz ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tgz mindi-kernel-${MINDI_VER}
    4143    tar cvfhj ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tar.bz2 mindi-kernel-${MINDI_VER}
     
    4648if [ "`echo $c | grep -v kernel | grep mindi`" != "" ]; then
    4749    cd ${BASE}/svn
    48     echo "Management of mindi ${MINDI_VER}"
     50    echo "Management of mindi ${MINDI_VER}-$rev"
    4951    rm -fr mindi-${MINDI_VER}
    5052    cp -a ${VER}/mindi mindi-${MINDI_VER}
     
    5355    find mindi-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    5456    find mindi-${MINDI_VER} -type f -name '*~' | xargs rm -rf
     57    if [ -f mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec ]; then
     58        specfile=mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec
     59    else
     60        specfile=mindi-${MINDI_VER}/distributions/common/mindi.spec
     61    fi
     62    sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MINDI_VER}/" $specfile > ${TOPDIR}/SPECS/mindi.spec
     63    rm -rf mindi-${MINDI_VER}/distributions
    5564    rm -f mindi-${MINDI_VER}/parted2fdisk mindi-${MINDI_VER}/parted2fdisk.c mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
    5665    mkdir -p ${TOPDIR}/SOURCES
    57     tar cvfhz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz mindi-${MINDI_VER}
    58     tar cvfhj ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 mindi-${MINDI_VER}
    59     sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MINDI_VER}/" mindi-${MINDI_VER}/mindi.spec > ${TOPDIR}/SPECS/mindi.spec
     66
     67    echo "Creating mindi tar files"
     68    tar cfhz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz mindi-${MINDI_VER}
     69    tar cfhj ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 mindi-${MINDI_VER}
    6070    rm -f ${TMP}/mindi-*-root
    6171    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
     
    6575if [ "`echo $c | grep  mondo`" != "" ]; then
    6676    cd ${BASE}/svn
    67     echo "Management of mondo ${MONDO_VER}"
     77    echo "Management of mondo ${MONDO_VER}-$rev"
    6878    rm -rf mondo-${MONDO_VER}
    6979    cp -a ${VER}/mondo mondo-${MONDO_VER}
     
    7686    find . -type f -name '*~' | xargs rm -rf
    7787    cd ..
    78     tar cvfhz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz mondo-${MONDO_VER}
    79     tar cvfhj ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 mondo-${MONDO_VER}
    80     sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MONDO_VER}/" mondo-${MONDO_VER}/mondo.spec > ${TOPDIR}/SPECS/mondo.spec
     88    if [ -f mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec ]; then
     89        specfile=mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec
     90    else
     91        specfile=mondo-${MONDO_VER}/distributions/common/mondo.spec
     92    fi
     93    sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MONDO_VER}/" $specfile > ${TOPDIR}/SPECS/mondo.spec
     94    rm -rf mondo-${MONDO_VER}/distributions
     95
     96    echo "Creating mondo tar files"
     97    tar cfhz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz mondo-${MONDO_VER}
     98    tar cfhj ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 mondo-${MONDO_VER}
    8199    rm -f ${TMP}/mondo-*-root
    82100    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
    83101fi
    84102cd ${TOPDIR}/SPECS
     103status=0
    85104if [ "`echo $c | grep kernel`" != "" ]; then
    86     rpmbuild -ba mindi-kernel.spec
     105    echo "Generating mindi-kernel RPMS"
     106    log=/tmp/mindi-kernel-rpm.log
     107    rpmbuild -ba mindi-kernel.spec 2> $log 1> $log
     108    if [ $? != 0 ]; then
     109        cat $log
     110        status=-1
     111    fi
    87112fi
    88113if [ "`echo $c | grep -v kernel | grep mindi`" != "" ]; then
    89     rpmbuild -ba mindi.spec
     114    echo "Generating mindi RPMS"
     115    log=/tmp/mindi-rpm.log
     116    rpmbuild -ba mindi.spec 2> $log 1> $log
     117    if [ $? != 0 ]; then
     118        cat $log
     119        status=-1
     120    fi
    90121fi
    91122if [ "`echo $c | grep mondo`" != "" ]; then
    92     rpmbuild -ba mondo.spec
     123    echo "Generating mondo RPMS"
     124    log=/tmp/mondo-rpm.log
     125    rpmbuild -ba mondo.spec 2> $log 1> $log
     126    if [ $? != 0 ]; then
     127        cat $log
     128        status=-1
     129    fi
    93130fi
    94 su - -c "$opt rpm -Uvh --force $pkg"
     131if [ $status = 0 ]; then
     132    echo "Installing RPMS as root ($pkg)"
     133    su - -c "$opt rpm -Uvh --force $pkg"
     134fi
  • branches/2.06/tools/rpm-env

    r316 r318  
    2020export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    2121
    22 mkdir -p ${BASE}/RPMS
    2322export TMP=${BASE}/tmp
    2423mkdir -p ${TMP}
     
    2827    export TOPDIR=${BASE}/RPMS
    2928fi
     29mkdir -p ${TOPDIR}
    3030cd ${TOPDIR}
    3131mkdir -p RPMS SRPMS SPECS SOURCES BUILD
Note: See TracChangeset for help on using the changeset viewer.