From c937033eaf70ab818a4179aa2dd12cf21f532e39 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 19 Oct 1999 22:10:08 +0000 Subject: Made it easier to change version numbers. --- scripts/gdb.spec.in | 10 +++++----- scripts/mkgdbspec | 26 ++++++++++++++++---------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/scripts/gdb.spec.in b/scripts/gdb.spec.in index 2795a582ba..a9e06aae5d 100644 --- a/scripts/gdb.spec.in +++ b/scripts/gdb.spec.in @@ -19,10 +19,10 @@ Provides: @target_alias@-gdb Autoreqprov: on Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com -Version: @Version@ +Version: gdb-@gdb_version@ Summary: gdb for target @target_alias@ -Source0: gdb-4.18.tar.gz -Patch0: gdb-4.18-rtems-19991015.diff +Source0: gdb-@gdb_version@.tar.gz +Patch0: gdb-@gdb_version@-rtems-@gdb_patch_version@.diff Buildroot: /tmp # Patch: @@ -37,7 +37,7 @@ Authors: ... %prep -# untar the sources inside @target_alias@-gdb-@Version@ +# untar the sources inside @target_alias@-gdb %setup -c -n @target_alias@-gdb -a 0 %patch0 -p0 @@ -45,7 +45,7 @@ Authors: %build test -d build || mkdir build ( cd build - ../gdb-4.18/configure --target=@target_alias@ \ + ../gdb-@gdb_version@/configure --target=@target_alias@ \ --verbose --prefix=/opt/rtems test -d $RPM_BUILD_ROOT/opt \ diff --git a/scripts/mkgdbspec b/scripts/mkgdbspec index 796984a7d6..06d17e6acf 100644 --- a/scripts/mkgdbspec +++ b/scripts/mkgdbspec @@ -4,11 +4,15 @@ # RTEMS_DIR=`dirname $0` -RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \ -sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` target_alias=$1 -release=0 + +# RPM release number +rpm_release=0 + +# gdb version number +gdb_version=4.18 +gdb_patch_version=19991015 # Some linux distributions use /usr/src/packages # redhat uses /usr/src/redhat @@ -24,12 +28,14 @@ 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" \ +specfile=${dst}/$target_alias-gdb-${gdb_version}.spec + +sed -e "s%@Release@%${release}%g" \ + -e "s%@target_alias@%${target_alias}%g" \ + -e "s%@gdb_version@%${gdb_version}%g" \ + -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \ < ${RTEMS_DIR}/gdb.spec.in \ -> ${dst}/$target_alias-gdb.spec +> ${specfile} case ${target} in powerpc*) @@ -40,6 +46,6 @@ case ${target} in echo "/opt/rtems/bin/@target_alias@-sis" ;; *) ;; -esac >> ${dst}/$target_alias-gdb.spec +esac >> ${specfile} -echo Generated ${dst}/$target_alias-gdb.spec. +echo Generated ${specfile}. -- cgit v1.2.3