summaryrefslogtreecommitdiffstats
path: root/scripts/mkgccnewlibspec
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-18 19:10:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-18 19:10:03 +0000
commit8c5e54b1afbf4f980543e3eccff3495d2fb84419 (patch)
tree64253854ac3a517c4cd2dc585b1632cf8d698239 /scripts/mkgccnewlibspec
parentRalf Corsepius (corsepiu@faw.uni-ulm.de) submitted these scripts to (diff)
downloadrtems-8c5e54b1afbf4f980543e3eccff3495d2fb84419.tar.bz2
Working on being able to cut RPMs. It now appears that the process
is working mostly for sparc at least. There is one major problem -- the current process generates a unique source file per RPM when in fact all of the source files are nearly the same -- it is only the spec part of the rpm which differs. The new file mkbinutils_subpackage_version is an attempt to address this. It does part of the job right -- one source file produces multiple binary RPMs. BUT the end user can not produce the resulting RPMS themselves from SRPMS unless they also build all targets.
Diffstat (limited to '')
-rw-r--r--scripts/mkgccnewlibspec34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/mkgccnewlibspec b/scripts/mkgccnewlibspec
new file mode 100644
index 0000000000..08af71f174
--- /dev/null
+++ b/scripts/mkgccnewlibspec
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Usage: mktoolspec CPU
+#
+
+RTEMS_DIR=`dirname $0`
+RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
+sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
+
+target_alias=$1
+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}/gccnewlib.spec.in \
+> ${dst}/$target_alias-gcc_newlib.spec
+
+echo Generated ${dst}/$target_alias-gcc_newlib.spec.