From 18408afbc7c4c4e67e91cc8a3a61232d6efadfc0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 15 Oct 1999 14:11:02 +0000 Subject: Ralf Corsepius (corsepiu@faw.uni-ulm.de) submitted these scripts to help build RPMs. --- scripts/mktoolspec | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/mktoolspec (limited to 'scripts/mktoolspec') diff --git a/scripts/mktoolspec b/scripts/mktoolspec new file mode 100644 index 0000000000..a9cf92a869 --- /dev/null +++ b/scripts/mktoolspec @@ -0,0 +1,33 @@ +#!/bin/sh +# + +RTEMS_DIR=`dirname $0` +RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \ +sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` + +bsp=$1 +target_alias=$2 +release=0 + +# Some linux distributions use /usr/src/packages +# redhat uses /usr/src/redhat +# others might use /usr/src +if test -d /usr/src/packages/SPECS; +then +dst=/usr/src/packages/SPECS; +elif test -d /usr/src/redhat/SPECS; + then +dst=/usr/src/redhat/SPECS; +elif test -d /usr/src/SPECS/; +then +dst=/usr/src/SPECS; +fi + +sed -e "s%@Version@%${RTEMS_VERSION}%g" \ +-e "s%@bsp@%${bsp}%g" \ +-e "s%@Release@%${release}%g" \ +-e "s%@target_alias@%${target_alias}%g" \ +< ${RTEMS_DIR}/toolchain.spec.in \ +> ${dst}/rtems-$target_alias-tools.spec + + -- cgit v1.2.3