source: rtems/scripts/mkbspspec.in @ 0ebf5694

4.104.114.84.95
Last change on this file since 0ebf5694 was b41a0d1, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 22, 1999 at 2:30:41 PM

RTEMS RPM basically working.

  • Property mode set to 100644
File size: 914 bytes
Line 
1#!/bin/sh
2#
3
4RTEMS_DIR=`dirname $0`/@top_srcdir@
5RTEMS_VERSION=@RTEMS_VERSION@
6
7CFG=setup.cache
8dst=@RPM_SPECSdir@
9
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;
39then
40  echo "Invalid number of arguments"
41  usage
42fi
43
44# target to build for
45target_alias=$1
46bsp=$2
47
48. ./$CFG
49
50specfile=${dst}/$target_alias-$bsp-${rtems_version}.spec
51
52sed -e "s%@Release@%${rtems_rpm_release}%g" \
53    -e "s%@bsp@%${bsp}%g" \
54    -e "s%@rtems_version@%${rtems_version}%g" \
55    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
56    -e "s%@target_alias@%${target_alias}%g" \
57< ${RTEMS_DIR}/rtems/rtems.spec.in \
58> ${specfile}
59
60echo Generated ${specfile}
Note: See TracBrowser for help on using the repository browser.