Ignore:
Timestamp:
May 14, 2006, 7:54:15 PM (14 years ago)
Author:
bcornec
Message:

Cleanup in build process continue

  • removal of most small scripts
  • based on one main svn2build script
  • spec files reviewed for fedora remarks
  • changelog and TAG integrated
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/build-env

    r549 r550  
    11#!/bin/bash
    22#
    3 # Creates RPMs environment from SVN repository
     3# Creates build environment for packages
     4# Executed on a VM (non-SVN)
    45#
    56# $Id$
    67#
    7 
    8 dname=`dirname $0`
    9 prem=`echo $dname |cut -c1`
    10 if [ ${prem} == "/" ]; then
    11     export TOOLHOME=$dname
    12 else
    13     export TOOLHOME=${PWD}/$dname
    14 fi
    15 
    16 . $TOOLHOME/common-env
    17 
    18 export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    198
    209# Should not be modified below
     
    2211export opt=""
    2312
    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
    32 
    3313if [ -e /etc/mandriva-release ]; then
     14    export dtype="rpm"
    3415    export dfam="mandriva"
    3516    export ddir="mandriva"
     
    3718    export suf=".`echo $dver | sed 's/\.//'`mdk"
    3819elif [ -e /etc/mandrake-release ]; then
     20    export dtype="rpm"
    3921    export dfam="mandriva"
    4022    export ddir="mandrake"
     
    4224    export suf=".`echo $dver | sed 's/\.//'`mdk"
    4325elif [ -e /etc/redhat-release ]; then
     26    export dtype="rpm"
    4427    grep -q Enterprise /etc/redhat-release
    4528    if [ $? -eq 0 ]; then
     
    6043    fi
    6144elif [ -e /etc/SuSE-release ]; then
     45    export dtype="rpm"
    6246    grep -q Enterprise /etc/SuSE-release
    6347    if [ $? -eq 0 ]; then
     
    7155    fi
    7256else
     57    export dtype="unknown"
    7358    export dfam="generic"
    7459    export dver=""
     
    7964    export suf=".${ddir}${dver}"
    8065fi
     66
     67if [ $dtype == "rpm" ]; then
     68    export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
     69    if [ -f ${HOME}/.rpmmacros ]; then
     70        export TOPDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
     71    else
     72        export TOPDIR=${BASE}/build
     73    fi
     74    mkdir -p ${TOPDIR}
     75    cd ${TOPDIR}
     76    mkdir -p RPMS SRPMS SPECS SOURCES BUILD
     77fi
     78
Note: See TracChangeset for help on using the changeset viewer.