Changeset 43e7d103 in rtems for scripts/mkbspspec.in


Ignore:
Timestamp:
10/21/99 15:59:54 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
39537657
Parents:
8f2cf931
Message:

Changes from Ralf with script-19991021-0. He fixed the %files
issue and has mkbspspec in a better state. user.cfg is now
gone.

There are some miscellaneous changes to buildall done by Joel
to clean up the build process.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/mkbspspec.in

    r8f2cf931 r43e7d103  
    22#
    33
    4 RTEMS_DIR=`dirname $0`
    5 RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
    6 sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
     4RTEMS_DIR=`dirname $0`/@top_srcdir@
     5RTEMS_VERSION=@RTEMS_VERSION@
    76
    8 bsp=$1
    9 target_alias=$2
    10 release=0
     7CFG=setup.cache
     8dst=@RPM_SPECSdir@
    119
    12 # Some linux distributions use /usr/src/packages
    13 # redhat uses /usr/src/redhat
    14 # others might use /usr/src
    15 if test -d /usr/src/packages/SPECS;
     10usage()
     11{
     12  echo "$0 [options] <target_alias> <bsp>"
     13  echo "  options:"
     14  echo "    -cfg <setup.cache>"
     15  echo "    -o <rpm-spec-dir>"
     16  exit 1 ;
     17}
     18
     19while test $# -ge 3; do
     20case $1 in
     21-cfg)
     22  shift
     23  CFG=$1
     24  shift
     25  ;;
     26-o)
     27  shift
     28  dst=$1
     29  shift
     30  ;;
     31-*)
     32  echo "invalid option $1";
     33  usage
     34  ;;
     35esac
     36done
     37
     38if test ! $# -eq 2;
    1639then
    17 dst=/usr/src/packages/SPECS;
    18 elif test -d /usr/src/redhat/SPECS;
    19  then
    20 dst=/usr/src/redhat/SPECS;
    21 elif test -d /usr/src/SPECS/;
    22 then
    23 dst=/usr/src/SPECS;
     40  echo "Invalid number of arguments"
     41  usage
    2442fi
     43
     44# target to build for
     45target_alias=$1
     46bsp=$2
     47
     48. ./$CFG
     49
     50specfile=${dst}/$target_alias-$bsp-$RTEMS_VERSION.spec
    2551
    2652sed -e "s%@Version@%${RTEMS_VERSION}%g" \
    2753-e "s%@bsp@%${bsp}%g" \
    28 -e "s%@Release@%${release}%g" \
     54-e "s%@Release@%${rtems_release}%g" \
    2955-e "s%@target_alias@%${target_alias}%g" \
    30 < ${RTEMS_DIR}/rtems.spec.in \
    31 > ${dst}/rtems-$target_alias-$bsp.spec
     56< ${RTEMS_DIR}/rtems/rtems.spec.in \
     57> ${specfile}
     58
     59echo Generated ${specfile}
Note: See TracChangeset for help on using the changeset viewer.