4.104.114.84.95
Last change
on this file since 59d1127 was
7063e223,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/21/99 at 17:22:02
|
Made the RTEMS version get substituted properly even though it is
not right yet.
Now can specify rpm_build_root via setup.
|
-
Property mode set to
100644
|
File size:
902 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | |
---|
4 | RTEMS_DIR=`dirname $0`/@top_srcdir@ |
---|
5 | RTEMS_VERSION=@RTEMS_VERSION@ |
---|
6 | |
---|
7 | CFG=setup.cache |
---|
8 | dst=@RPM_SPECSdir@ |
---|
9 | |
---|
10 | usage() |
---|
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 | |
---|
19 | while test $# -ge 3; do |
---|
20 | case $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 | ;; |
---|
35 | esac |
---|
36 | done |
---|
37 | |
---|
38 | if test ! $# -eq 2; |
---|
39 | then |
---|
40 | echo "Invalid number of arguments" |
---|
41 | usage |
---|
42 | fi |
---|
43 | |
---|
44 | # target to build for |
---|
45 | target_alias=$1 |
---|
46 | bsp=$2 |
---|
47 | |
---|
48 | . ./$CFG |
---|
49 | |
---|
50 | specfile=${dst}/$target_alias-$bsp-$RTEMS_VERSION.spec |
---|
51 | |
---|
52 | sed -e "s%@Version@%${RTEMS_VERSION}%g" \ |
---|
53 | -e "s%@bsp@%${bsp}%g" \ |
---|
54 | -e "s%@Release@%${rtems_release}%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 | |
---|
60 | echo Generated ${specfile} |
---|
Note: See
TracBrowser
for help on using the repository browser.