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

4.104.114.84.95
Last change on this file since 0c602f0 was 0c602f0, checked in by Joel Sherrill <joel.sherrill@…>, on 01/23/00 at 19:20:02

Patch from David Fiddes <D.J@…> which adds basic
Cygwin support to the RPM scripts. The patch from David did not
apply cleanly and Joel ended up making all the modifications
plus some it should have included for consistency by hand. His comments:

I've included a diff against the last (19991203) snapshot RPM scripts that
adds what I think is required for Cygwin support. Basically all this boils
down to is adding EXE extension support. I've added the AC_EXEEXT rule to
conifgure.in (requires a valid 'cc' to work - this is not available in the
standard Cygwin distro). Each of the *.spec.in have @exe_ext@ includes in
them for each program that results in an EXE. The only odity here is that
the chill driver program is a shell script and thus does not require .exe to
be added... The mk*.in have all been updated to process the new exe_ext
rule.

  • Property mode set to 100644
File size: 967 bytes
Line 
1#!/bin/sh
2#
3
4RTEMS_DIR=`dirname $0`/@top_srcdir@
5RTEMS_VERSION=@RTEMS_VERSION@
6
7CFG=setup.cache
8dst=@RPM_SPECSdir@
9exe_ext=@EXEEXT@
10
11usage()
12{
13  echo "$0 [options] <target_alias> <bsp>"
14  echo "  options:"
15  echo "    -cfg <setup.cache>"
16  echo "    -o <rpm-spec-dir>"
17  exit 1 ;
18}
19
20while test $# -ge 3; do
21case $1 in
22-cfg)
23  shift
24  CFG=$1
25  shift
26  ;;
27-o)
28  shift
29  dst=$1
30  shift
31  ;;
32-*)
33  echo "invalid option $1";
34  usage
35  ;;
36esac
37done
38
39if test ! $# -eq 2;
40then
41  echo "Invalid number of arguments"
42  usage
43fi
44
45# target to build for
46target_alias=$1
47bsp=$2
48
49. ./$CFG
50
51specfile=${dst}/$target_alias-$bsp-${rtems_version}.spec
52
53sed -e "s%@Release@%${rtems_rpm_release}%g" \
54    -e "s%@bsp@%${bsp}%g" \
55    -e "s%@rtems_version@%${rtems_version}%g" \
56    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
57    -e "s%@target_alias@%${target_alias}%g" \
58    -e "s%@ext_ext@%${ext_ext}%g" \
59< ${RTEMS_DIR}/rtems/rtems.spec.in \
60> ${specfile}
61
62echo Generated ${specfile}
Note: See TracBrowser for help on using the repository browser.