Changeset 18 for trunk


Ignore:
Timestamp:
Sep 7, 2005, 6:46:11 PM (14 years ago)
Author:
bcornec
Message:

Common script for both ia64 and i386 dev. with a single HOME dir parameter.
Should now work for most installations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mkrpm

    r17 r18  
    1414
    1515mkdir -p ${BASE}/RPMS
    16 cd ${BASE}/RPMS
     16TMP=${BASE}/tmp
     17mkdir -p ${TMP}
     18if [ -f ${HOME}/.rpmmacros ]; then
     19    TOPDIR=`grep _topdir ${HOME}/.rpmmacros | awk '{print $2}'`
     20else
     21    TOPDIR=${BASE}/RPMS
     22fi
     23cd ${TOPDIR}
    1724mkdir -p RPMS SRPMS SPECS SOURCES BUILD
    1825
    19 cd ${BASE}/svn
    2026if [ "$1" = "" ]; then
    2127    c="mindi mondo"
     
    2430fi
    2531if [ "`echo $c | grep mindi`" != "" ]; then
    26     cd mindi
    27     MINDI_VER=`cat $VER/mindi.spec | egrep '^Version:' | cut -d: -f2 | sed "s/ *//"`
     32    cd ${BASE}/svn
     33    MINDI_VER=`cat ${VER}/mindi/mindi.spec | egrep '^Version:' | cut -d: -f2 | sed "s/[     ]*//"`
     34    echo "Management of mindi ${MINDI_VER}"
    2835    rm -fr mindi-${MINDI_VER}
    29     cp -a $VER mindi-${MINDI_VER}
     36    cp -a ${VER}/mindi mindi-${MINDI_VER}
    3037    find mindi-${MINDI_VER} -type d -name .svn | xargs rm -rf
    3138    find mindi-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    3239    rm -f mindi-${MINDI_VER}/parted2fdisk mindi-${MINDI_VER}/parted2fdisk.c mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
    33     mkdir -p ../../RPMS/SOURCES
    34     tar cvfhz ../../RPMS/SOURCES/mindi-${MINDI_VER}.tgz mindi-${MINDI_VER}
    35     cp mindi-${MINDI_VER}/mindi.spec ../../RPMS/SPECS/mindi.spec
    36     rm -f ${BASE}/../tmp/mindi-*-root
    37     cd ..
    38     pkg="$pkg ${BASE}/RPMS/RPMS/${ARCH}/mindi-${MINDI_VER}-1.${ARCH}.rpm"
     40    mkdir -p ${TOPDIR}/SOURCES
     41    tar cvfhz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz mindi-${MINDI_VER}
     42    cp mindi-${MINDI_VER}/mindi.spec ${TOPDIR}/SPECS/mindi.spec
     43    rm -f ${TMP}/mindi-*-root
     44    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-1.${ARCH}.rpm"
    3945    # ATTENTION: This could be dangerous for your setup
    4046    opt="rm -rf /usr/share/mindi ;"
    4147fi
    4248if [ "`echo $c | grep  mondo`" != "" ]; then
    43     cd mondo
    44     MONDO_VER=`cat $VER/mondo.spec | egrep '^Version:' | cut -d: -f2 | sed "s/ *//"`
     49    cd ${BASE}/svn
     50    MONDO_VER=`cat ${VER}/mondo/mondo.spec | egrep '^Version:' | cut -d: -f2 | sed "s/[     ]*//"`
    4551    rm -rf mondo-${MONDO_VER}
    46     cp -a $VER mondo-${MONDO_VER}
     52    cp -a ${VER}/mondo mondo-${MONDO_VER}
    4753    cd mondo-${MONDO_VER}
    4854    echo "Bootstraping mondo ... "
     
    5157    find . -type f -name '.*.swp' | xargs rm -rf
    5258    cd ..
    53     tar cvfhz ../../RPMS/SOURCES/mondo-${MONDO_VER}.tgz mondo-${MONDO_VER}
    54     cp mondo-${MONDO_VER}/mondo.spec ../../RPMS/SPECS/mondo.spec
    55     rm -f ${BASE}/../tmp/mondo-*-root
    56     cd ..
    57     pkg="$pkg ${BASE}/RPMS/RPMS/${ARCH}/mondo-${MONDO_VER}-1.${ARCH}.rpm"
     59    tar cvfhz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz mondo-${MONDO_VER}
     60    cp mondo-${MONDO_VER}/mondo.spec ${TOPDIR}/SPECS/mondo.spec
     61    rm -f ${TMP}/mondo-*-root
     62    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-1.${ARCH}.rpm"
    5863fi
    59 cd ../RPMS/SPECS
     64cd ${TOPDIR}/SPECS
    6065if [ "`echo $c | grep mindi`" != "" ]; then
    6166    rpmbuild -ba mindi.spec
Note: See TracChangeset for help on using the changeset viewer.