summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-19 22:02:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-19 22:02:39 +0000
commitab25407cccdebedd84524fd07c5e36e09a6d15f4 (patch)
tree428549ec8bc85e69728247349e44a42c5b732c30
parentc5b8d6d332f227b865ef320c5b5beb26968dbebe (diff)
downloadrtems-ab25407cccdebedd84524fd07c5e36e09a6d15f4.tar.bz2
Easier to insert tool version number.
-rw-r--r--scripts/gccnewlib.spec.in22
-rw-r--r--scripts/mkgccnewlibspec29
2 files changed, 31 insertions, 20 deletions
diff --git a/scripts/gccnewlib.spec.in b/scripts/gccnewlib.spec.in
index 8cf8f9ea0a..1bf0b26a39 100644
--- a/scripts/gccnewlib.spec.in
+++ b/scripts/gccnewlib.spec.in
@@ -19,12 +19,12 @@ Provides: @target_alias@-gcc-newlib
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
-Version: @Version@
+Version: gcc-@gcc_version@-newlib-@newlib_version@
Summary: rtems gcc and newlib C Library for target @target_alias@
-Source0: gcc-2.95.1.tar.gz
-Source1: newlib-1.8.2.tar.gz
-Patch0: gcc-2.95.1-rtems-19991015.diff
-Patch1: newlib-1.8.2-rtems-19991015.diff
+Source0: gcc-@gcc_version@.tar.gz
+Source1: newlib-@newlib_version@.tar.gz
+Patch0: gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
+Patch1: newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
Buildroot: /tmp
# Patch:
@@ -39,22 +39,22 @@ Authors:
...
%prep
-# untar the sources inside @target_alias@-gcc-newlib -@Version@
+# untar the sources inside @target_alias@-gcc-newlib
%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
%patch0 -p0
%patch1 -p0
-( cd gcc-2.95.1
+( cd gcc-@gcc_version@
# Now link the C library into the source tree
- ln -s ../newlib-1.8.2/newlib .
+ ln -s ../newlib-@newlib_version@/newlib .
)
%build
test -d build || mkdir build
( cd build
- ../gcc-2.95.1/configure --target=@target_alias@ \
+ ../gcc-@gcc_version@/configure --target=@target_alias@ \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--prefix=/opt/rtems
@@ -69,7 +69,7 @@ test -d build || mkdir build
test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
|| mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
- srclimits=../gcc-2.95.1/newlib/libc/sys/rtems/include/limits.h
+ srclimits=../gcc-@gcc_version@/newlib/libc/sys/rtems/include/limits.h
for dir in $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
$RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
do
@@ -111,7 +111,7 @@ test -d build || mkdir build
/opt/rtems/bin/@target_alias@-g++
/opt/rtems/bin/@target_alias@-gcc
/opt/rtems/bin/@target_alias@-gcj
-/opt/rtems/lib/gcc-lib/@target_alias@/2.95.1
+/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@
/opt/rtems/@target_alias@/include*
/opt/rtems/@target_alias@/sys-include
/opt/rtems/@target_alias@/lib*
diff --git a/scripts/mkgccnewlibspec b/scripts/mkgccnewlibspec
index 08af71f174..172d905ca6 100644
--- a/scripts/mkgccnewlibspec
+++ b/scripts/mkgccnewlibspec
@@ -4,11 +4,19 @@
#
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
+
+# gcc version number
+gcc_version=2.95.1
+gcc_patch_version=19991015
+
+# newlib version number
+newlib_version=1.8.2
+newlib_patch_version=19991015
# Some linux distributions use /usr/src/packages
# redhat uses /usr/src/redhat
@@ -24,11 +32,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-gcc-${gcc_version}-newlib-${newlib_version}.spec
+sed -e "s%@Release@%${rpm_release}%g" \
+ -e "s%@target_alias@%${target_alias}%g" \
+ -e "s%@gcc_version@%${gcc_version}%g" \
+ -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
+ -e "s%@newlib_version@%${newlib_version}%g" \
+ -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
< ${RTEMS_DIR}/gccnewlib.spec.in \
-> ${dst}/$target_alias-gcc_newlib.spec
+> ${specfile}
-echo Generated ${dst}/$target_alias-gcc_newlib.spec.
+echo Generated ${specfile}.