Changeset 319 in MondoRescue for branches/2.06/tools/deb-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/deb-env

    r318 r319  
    11#!/bin/bash
    22#
    3 # Creates RPMs environment from SVN repository
     3# Creates deb environment from SVN repository
    44#
    55# $Id$
    66#
    77
    8 # Adapt to your needs
    9 export 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"
     8dname=`dirname $0`
     9prem=`echo $dname |cut -c1`
     10if [ ${prem} == "/" ]; then
     11        export TOOLHOME=$dname
     12else
     13    export TOOLHOME=${PWD}/$dname
     14fi
     15
     16. $TOOLHOME/common-env
    1417
    1518# Should not be modified below
    1619dname=`dirname $0`
    17 export VER="branches/`cat $dname/../mondo/VERSION`"
    18 export pkg=""
    19 export opt=""
    20 export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    2120
    22 export TMP=${BASE}/tmp
    23 mkdir -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
     21# TBD
     22export TOPDIR=${BASE}/debs
    2923mkdir -p ${TOPDIR}
    30 cd ${TOPDIR}
    31 mkdir -p RPMS SRPMS SPECS SOURCES BUILD
    3224
    33 export MINDI_VER=`cat ${BASE}/svn/${VER}/mindi/VERSION`
    34 export MONDO_VER=`cat ${BASE}/svn/${VER}/mondo/VERSION`
    35 
    36 if [ -e /etc/mandriva-release ]; then
    37     export ddir="mandriva"
    38     export dver=`awk '{print $4}' /etc/mandriva-release`
     25if [ -e /etc/debian-release ]; then
     26    export ddir="debian"
     27    export dver=`awk '{print $4}' /etc/debian-release`
    3928    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"
    7029fi
    7130
Note: See TracChangeset for help on using the changeset viewer.