Changeset 319 in MondoRescue for branches/2.06/tools/mkrpm


Ignore:
Timestamp:
Jan 14, 2006, 11:44:12 AM (15 years ago)
Author:
bcornec
Message:
  • split build architecture to allow for multiple packages generation (rpms, debs, ebuild, ...)
  • only prepared for rpms and debs at the moment

Use tools/mkrpm to generate all the RPMs
Use tools/mkdeb (to be coded correctly) to generate all the debs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/tools/mkrpm

    r318 r319  
    1717. $TOOLHOME/rpm-env
    1818
    19 # To be safe for SVN commands
    20 cd $TOOLHOME/..
    21 rev=`$TOOLHOME/mksvnversion`
    22 
    23 echo "Generating SVN log file ..."
    24 svn log -v > /tmp/mondorescue-svn.log
    25 
    2619if [ "$1" = "" ]; then
    2720    c="mindi mondo"
     
    2922    c=$1
    3023fi
     24
     25$TOOLHOME/mkcommon "$c"
     26
    3127if [ "`echo $c | grep mindi-kernel`" != "" ]; then
    3228    cd ${BASE}/svn
    33     echo "Management of mindi-kernel ${MINDI_VER}-$rev"
    34     rm -fr mindi-kernel-${MINDI_VER}
    35     cp -a ${VER}/mindi-kernel mindi-kernel-${MINDI_VER}
    36     find mindi-kernel-${MINDI_VER} -type d -name .svn | xargs rm -rf
    37     find mindi-kernel-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    38     find mindi-kernel-${MINDI_VER} -type f -name '*~' | xargs rm -rf
    3929    mkdir -p ${TOPDIR}/SOURCES
    40 
    41     echo "Creating mindi-kernel tar files"
    42     tar cvfhz ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tgz mindi-kernel-${MINDI_VER}
    43     tar cvfhj ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tar.bz2 mindi-kernel-${MINDI_VER}
    44     sed "s/^%define mrel..*RRR/%define mrel ${rev}${suf}/" mindi-kernel-${MINDI_VER}/mindi-kernel.spec > ${TOPDIR}/SPECS/mindi-kernel.spec
    45     rm -f ${TMP}/mindi-kernel*-root
    46     pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-kernel-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
     30    sed "s/^%define mrel..*RRR/%define mrel ${REVISION}${suf}/" mindi-kernel-${MINDI_VER}/mindi-kernel.spec > ${TOPDIR}/SPECS/mindi-kernel.spec
     31    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-kernel-${MINDI_VER}-${REVISION}${suf}.${ARCH}.rpm"
    4732fi
    4833if [ "`echo $c | grep -v kernel | grep mindi`" != "" ]; then
    4934    cd ${BASE}/svn
    50     echo "Management of mindi ${MINDI_VER}-$rev"
    51     rm -fr mindi-${MINDI_VER}
    52     cp -a ${VER}/mindi mindi-${MINDI_VER}
    53     cp -a /tmp/mondorescue-svn.log mindi-${MINDI_VER}/svn.log
    54     find mindi-${MINDI_VER} -type d -name .svn | xargs rm -rf
    55     find mindi-${MINDI_VER} -type f -name '.*.swp' | xargs rm -rf
    56     find mindi-${MINDI_VER} -type f -name '*~' | xargs rm -rf
    5735    if [ -f mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec ]; then
    5836        specfile=mindi-${MINDI_VER}/distributions/${ddir}/mindi.spec
     
    6038        specfile=mindi-${MINDI_VER}/distributions/common/mindi.spec
    6139    fi
    62     sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MINDI_VER}/" $specfile > ${TOPDIR}/SPECS/mindi.spec
     40    sed -e "s/^%define mrel..*RRR/%define mrel  ${REVISION}${suf}/" -e "s/VVV/${MINDI_VER}/" $specfile > ${TOPDIR}/SPECS/mindi.spec
    6341    rm -rf mindi-${MINDI_VER}/distributions
    64     rm -f mindi-${MINDI_VER}/parted2fdisk mindi-${MINDI_VER}/parted2fdisk.c mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
    6542    mkdir -p ${TOPDIR}/SOURCES
    6643
    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}
    70     rm -f ${TMP}/mindi-*-root
    71     pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
     44    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${REVISION}${suf}.${ARCH}.rpm"
    7245    # ATTENTION: This could be dangerous for your setup
    7346    opt="rm -rf /usr/lib/mindi ;"
     
    7548if [ "`echo $c | grep  mondo`" != "" ]; then
    7649    cd ${BASE}/svn
    77     echo "Management of mondo ${MONDO_VER}-$rev"
    78     rm -rf mondo-${MONDO_VER}
    79     cp -a ${VER}/mondo mondo-${MONDO_VER}
    80     cp -a /tmp/mondorescue-svn.log mondo-${MONDO_VER}/svn.log
    81     cd mondo-${MONDO_VER}
    82     echo "Bootstraping mondo ... "
    83     ./bootstrap
    84     find . -type d -name .svn | xargs rm -rf
    85     find . -type f -name '.*.swp' | xargs rm -rf
    86     find . -type f -name '*~' | xargs rm -rf
    87     cd ..
    8850    if [ -f mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec ]; then
    8951        specfile=mondo-${MONDO_VER}/distributions/${ddir}/mondo.spec
     
    9153        specfile=mondo-${MONDO_VER}/distributions/common/mondo.spec
    9254    fi
    93     sed -e "s/^%define mrel..*RRR/%define mrel  ${rev}${suf}/" -e "s/VVV/${MONDO_VER}/" $specfile > ${TOPDIR}/SPECS/mondo.spec
     55    sed -e "s/^%define mrel..*RRR/%define mrel  ${REVISION}${suf}/" -e "s/VVV/${MONDO_VER}/" $specfile > ${TOPDIR}/SPECS/mondo.spec
    9456    rm -rf mondo-${MONDO_VER}/distributions
    9557
    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}
    99     rm -f ${TMP}/mondo-*-root
    100     pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
     58    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${REVISION}${suf}.${ARCH}.rpm"
    10159fi
     60
    10261cd ${TOPDIR}/SPECS
    10362status=0
Note: See TracChangeset for help on using the changeset viewer.