Changeset 319 in MondoRescue for branches/2.06/tools/common-env


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 copied

Legend:

Unmodified
Added
Removed
  • branches/2.06/tools/common-env

    r318 r319  
    11#!/bin/bash
    22#
    3 # Creates RPMs environment from SVN repository
     3# Creates common environment from SVN repository
    44#
    55# $Id$
     
    88# Adapt to your needs
    99export BASE=${HOME}/mondo
    10 export SVNAUTH=bcornec@shell.berlios.de
    11 export DSTDIR=/home/groups/ftp/pub/mondorescue
    12 export FTPSERV="ftp.berlios.de"
    13 export FTPDIR="/incoming"
    1410
    1511# Should not be modified below
    1612dname=`dirname $0`
    1713export VER="branches/`cat $dname/../mondo/VERSION`"
    18 export pkg=""
    19 export opt=""
    20 export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    21 
    2214export TMP=${BASE}/tmp
    2315mkdir -p ${TMP}
    24 if [ -f ${HOME}/.rpmmacros ]; then
    25     export TOPDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
    26 else
    27     export TOPDIR=${BASE}/RPMS
    28 fi
    29 mkdir -p ${TOPDIR}
    30 cd ${TOPDIR}
    31 mkdir -p RPMS SRPMS SPECS SOURCES BUILD
    3216
    3317export MINDI_VER=`cat ${BASE}/svn/${VER}/mindi/VERSION`
    3418export MONDO_VER=`cat ${BASE}/svn/${VER}/mondo/VERSION`
    3519
    36 if [ -e /etc/mandriva-release ]; then
    37     export ddir="mandriva"
    38     export dver=`awk '{print $4}' /etc/mandriva-release`
    39     export suf=".`echo $dver | sed 's/\.//'`mdk"
    40 elif [ -e /etc/mandrake-release ]; then
    41     export ddir="mandrake"
    42     export dver=`awk '{print $3}' /etc/mandrake-release`
    43     export suf=".`echo $dver | sed 's/\.//'`mdk"
    44 elif [ -e /etc/redhat-release ]; then
    45     grep -q Enterprise /etc/redhat-release
    46     if [ $? -eq 0 ]; then
    47         export ddir="rhel"
    48         export dver=`awk '{print $7}' /etc/redhat-release`
    49     elif grep -q Fedora /etc/redhat-release ; then
    50         export ddir="fedora"
    51         export dver=`awk '{print $4}' /etc/redhat-release`
    52         export suf=".fc${dver}"
    53     else
    54         export ddir="redhat"
    55         export dver=`awk '{print $5}' /etc/redhat-release | sed "s/\.//"`
    56         export suf=".rh${dver}"
    57     fi
    58 elif [ -e /etc/SuSE-release ]; then
    59     grep -q Enterprise /etc/SuSE-release
    60     if [ $? -eq 0 ]; then
    61         export ddir="sles"
    62         export dver=`head -1 /etc/SuSE-release | awk '{print $5}'`
    63     else
    64         export ddir="suse"
    65         export dver=`head -1 /etc/SuSE-release | awk '{print $3}'`
    66     fi
    67 else
    68     export dver=""
    69     export ddir="generic"
    70 fi
    71 
    72 if [ _"$suf" = _"" ]; then
    73     export suf=".${ddir}${dver}"
    74 fi
     20# To be safe for SVN commands
     21cd $TOOLHOME/..
     22export REVISION=`$TOOLHOME/mksvnversion`
Note: See TracChangeset for help on using the changeset viewer.