From 620c972cf16a22dd3cb92e7ae127e915869df79b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 29 Jul 2002 07:40:53 +0000 Subject: 2002-07-29 Ralf Corsepius * ChangeLog: Fix 2002-07-22 ChangeLog entry bogusly referring to Joel. * cpukit/Makefile.am: New. * cpukit/mkspec.in: New. * cpukit/rtems-cpukit.spec.in: New. * cpukit/.cvsignore: New. * configure.ac: Add cpukit. Add RTEMS_TOP to pickup _RTEMS_VERSION (required by cpukit). * Makefile.am: Add cpukit. Add ACLOCAL_AMFLAGS (required to pickup RTEMS_VERSION). * setup.def: Use %{_tmppath} as default for $rpm_build_root. * mkbinutilsspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root. * mkgccnewlibspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root. * mkgcc3newlibspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root. * mkgdbspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root. --- scripts/ChangeLog | 24 +++++++++++- scripts/Makefile.am | 3 +- scripts/configure.ac | 3 ++ scripts/cpukit/.cvsignore | 4 ++ scripts/cpukit/Makefile.am | 66 ++++++++++++++++++++++++++++++++ scripts/cpukit/mkspec.in | 57 ++++++++++++++++++++++++++++ scripts/cpukit/rtems-cpukit.spec.in | 75 +++++++++++++++++++++++++++++++++++++ scripts/mkgcc3newlibspec.in | 2 +- scripts/mkgccnewlibspec.in | 2 +- scripts/mkgdbspec.in | 2 +- scripts/setup.def | 2 +- 11 files changed, 234 insertions(+), 6 deletions(-) create mode 100644 scripts/cpukit/.cvsignore create mode 100644 scripts/cpukit/Makefile.am create mode 100644 scripts/cpukit/mkspec.in create mode 100644 scripts/cpukit/rtems-cpukit.spec.in (limited to 'scripts') diff --git a/scripts/ChangeLog b/scripts/ChangeLog index 662bee9085..83046dd23b 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,4 +1,26 @@ -2002-07-22 Joel Sherrill +2002-07-29 Ralf Corsepius + + * ChangeLog: Fix 2002-07-22 ChangeLog entry bogusly referring to + Joel. + * cpukit/Makefile.am: New. + * cpukit/mkspec.in: New. + * cpukit/rtems-cpukit.spec.in: New. + * cpukit/.cvsignore: New. + * configure.ac: Add cpukit. + Add RTEMS_TOP to pickup _RTEMS_VERSION (required by cpukit). + * Makefile.am: Add cpukit. Add ACLOCAL_AMFLAGS (required to pickup + RTEMS_VERSION). + * setup.def: Use %{_tmppath} as default for $rpm_build_root. + * mkbinutilsspec.in: Use ',' as pattern delimiter in sed expression + for $rpm_build_root. + * mkgccnewlibspec.in: Use ',' as pattern delimiter in sed + expression for $rpm_build_root. + * mkgcc3newlibspec.in: Use ',' as pattern delimiter in sed + expression for $rpm_build_root. + * mkgdbspec.in: Use ',' as pattern delimiter in sed expression for + $rpm_build_root. + +2002-07-22 Ralf Corsepius * binutils/Makefile.am: Add or32-rtems-binutils. diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 3f122d0e3e..94444380e9 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -2,8 +2,9 @@ ## $Id$ ## +ACLOCAL_AMFLAGS = -I ../aclocal -SUBDIRS = . binutils gccnewlib gcc3newlib gdb rtems autotools +SUBDIRS = . binutils gccnewlib gcc3newlib gdb rtems autotools cpukit noinst_SCRIPTS = setup buildall buildalltar mkbinutilspec mkbspspec \ mkgccnewlibspec mkgcc3newlibspec mkgdbspec mkrpms mkspec diff --git a/scripts/configure.ac b/scripts/configure.ac index 0a7e72e197..3183da5a69 100644 --- a/scripts/configure.ac +++ b/scripts/configure.ac @@ -3,6 +3,7 @@ AC_PREREQ(2.52) AC_INIT([rtems-scripts],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com]) AC_CONFIG_SRCDIR([binutils]) +RTEMS_TOP([..]) AC_PREFIX_DEFAULT([/opt/rtems]) AM_INIT_AUTOMAKE([no-define foreign 1.6]) @@ -91,7 +92,9 @@ gdb/Makefile rtems/Makefile autotools/Makefile autotools/automake-rtems.spec +cpukit/Makefile ]) +AC_CONFIG_FILES([cpukit/mkspec],[chmod +x cpukit/mkspec]) AC_CONFIG_COMMANDS([default],[[chmod 755 buildall chmod 755 buildalltar ]],[[]]) diff --git a/scripts/cpukit/.cvsignore b/scripts/cpukit/.cvsignore new file mode 100644 index 0000000000..8e68a95411 --- /dev/null +++ b/scripts/cpukit/.cvsignore @@ -0,0 +1,4 @@ +*.spec +Makefile +Makefile.in +rtems.spec diff --git a/scripts/cpukit/Makefile.am b/scripts/cpukit/Makefile.am new file mode 100644 index 0000000000..d17f183083 --- /dev/null +++ b/scripts/cpukit/Makefile.am @@ -0,0 +1,66 @@ +## +## $Id$ +## + + +MKSPEC = $(SHELL) ./mkspec + +MKSPEC_DEPS = mkspec rtems-cpukit.spec.in \ + $(top_builddir)/setup.cache + +c4x-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . c4x-rtems > $@ +RPM_SPECS_DATA = c4x-rtems-cpukit.spec + +hppa1.1-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems > $@ +RPM_SPECS_DATA += hppa1.1-rtems-cpukit.spec + +h8300-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . h8300-rtems > $@ +RPM_SPECS_DATA += h8300-rtems-cpukit.spec + +i386-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems > $@ +RPM_SPECS_DATA += i386-rtems-cpukit.spec + +i960-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems > $@ +RPM_SPECS_DATA += i960-rtems-cpukit.spec + +m68k-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems > $@ +RPM_SPECS_DATA += m68k-rtems-cpukit.spec + +mips64orion-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems > $@ +RPM_SPECS_DATA += mips64orion-rtems-cpukit.spec + +mips-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . mips-rtems > $@ +RPM_SPECS_DATA += mips-rtems-cpukit.spec + +powerpc-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems > $@ +RPM_SPECS_DATA += powerpc-rtems-cpukit.spec + +sh-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems > $@ +RPM_SPECS_DATA += sh-rtems-cpukit.spec + +sh-rtemself-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself > $@ +RPM_SPECS_DATA += sh-rtemself-cpukit.spec + +sparc-rtems-cpukit.spec: $(MKSPEC_DEPS) + $(MKSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems > $@ +RPM_SPECS_DATA += sparc-rtems-cpukit.spec + +TEMPLATES = rtems-cpukit.spec.in + +noinst_DATA = $(TEMPLATES) + +EXTRA_DIST = $(TEMPLATES) + +CLEANFILES = $(RPM_SPECS_DATA) +include $(top_srcdir)/../automake/local.am diff --git a/scripts/cpukit/mkspec.in b/scripts/cpukit/mkspec.in new file mode 100644 index 0000000000..d44ce336d7 --- /dev/null +++ b/scripts/cpukit/mkspec.in @@ -0,0 +1,57 @@ +#!/bin/sh +# + +RTEMS_DIR=`dirname $0`/@top_srcdir@ +RTEMS_VERSION=@VERSION@ +RPM_VERSION=`echo ${RTEMS_VERSION} | tr - _` + +CFG=../setup.cache +dst=@RPM_SPECSdir@ +exe_ext=@EXEEXT@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + exit 1 ; +} + +while test $# -ge 3; do +case $1 in +-cfg) + shift + CFG=$1 + shift + ;; +-o) + shift + dst=$1 + shift + ;; +-*) + echo "invalid option $1"; + usage + ;; +esac +done + +if test ! $# -eq 1; +then + echo "Invalid number of arguments" >&2 + usage >&2 +fi + +# target to build for +target_alias=$1 + +. ./$CFG + +sed -e "s%@Release\@%${rtems_rpm_release}%g" \ + -e "s%@rtems_version\@%${RTEMS_VERSION}%g" \ + -e "s%@rpm_version\@%${RPM_VERSION}%g" \ + -e "s,@rpm_build_root\@,${rpm_build_root},g" \ + -e "s%@target_alias\@%${target_alias}%g" \ + -e "s%@exe_ext\@%${exe_ext}%g" \ +< ${RTEMS_DIR}/cpukit/rtems-cpukit.spec.in diff --git a/scripts/cpukit/rtems-cpukit.spec.in b/scripts/cpukit/rtems-cpukit.spec.in new file mode 100644 index 0000000000..3510beb24c --- /dev/null +++ b/scripts/cpukit/rtems-cpukit.spec.in @@ -0,0 +1,75 @@ +# +# spec file for package rtems-cpukit +# +# Copyright (c) 2002 Ralf Corsepius, Ulm, Germany +# +# please send bugfixes or comments to joel@OARcorp.com +# + +%define _prefix /opt/rtems + +Vendor: OAR Corporation +Distribution: Linux +Name: @target_alias@-cpukit +Release: @Release@ +License: Various, Open Source. +Group: rtems + +Autoreqprov: on +Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com +BuildPreReq: @target_alias@-binutils +BuildPreReq: @target_alias@-gcc +Requires: @target_alias@-binutils +Requires: @target_alias@-gcc + +Version: @rpm_version@ +Summary: A free operating system for embedded systems +Source: rtems-@rtems_version@.tar.gz + +# +# The original sources are not included in the source RPM. +# If we included them, then the source RPMs for each target +# would duplicate MBs of source unnecessarily. This is +# a duplication of over 30 MBs of source for each of +# the more than 10 targets it is possible to build. +# +# You can get them yourself from the Internet and copy them to +# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). +# Or you can try the ftp options of rpm :-) +# +NoSource: 0 +# We claim to be relocatible, but in fact we are not +Prefix: %{_prefix} +Buildroot: %{_tmppath}/%{name}-%{version}-root + +%description +RTEMS is a free operating system for embedded systems. + +This package contains the cpukit for cpu @target_alias@. + +Authors: +-------- + Joel Sherrill (joel@oarcorp.com) + ... + +%prep +%setup -c -T -n %{name}-%{version} -a0 +test -d build || mkdir build +%build +cd build +# rtems does not support building inside the source tree + ../rtems-@rtems_version@/cpukit/configure \ + --build=`../rtems-@rtems_version@/config.guess` \ + --prefix=%{_prefix} \ + --host=@target_alias@ --target=@target_alias@ \ + --exec-prefix=%{_prefix}/@target_alias@ \ + --enable-multilib + make RTEMS_BSP= +%install +cd build + make RTEMS_BSP= DESTDIR=${RPM_BUILD_ROOT} install + +%files +%{_prefix}/@target_alias@ +# ignore +# %{_mandir} \ No newline at end of file diff --git a/scripts/mkgcc3newlibspec.in b/scripts/mkgcc3newlibspec.in index 00be744092..89d322305c 100644 --- a/scripts/mkgcc3newlibspec.in +++ b/scripts/mkgcc3newlibspec.in @@ -78,7 +78,7 @@ sed -e "s,@PATCH1\@,${PATCH1}," \ -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \ -e "s%@target_alias\@%${target_alias}%g" \ -e "s%@prefix\@%@prefix@%g" \ - -e "s%@rpm_build_root\@%${rpm_build_root}%g" \ + -e "s,@rpm_build_root\@,${rpm_build_root},g" \ -e "s%@gcc_version\@%${gcc3_version}%g" \ -e "s%@gcc_patch_version\@%${gcc3_patch_version}%g" \ -e "s%@newlib_version\@%${gcc3newlib_version}%g" \ diff --git a/scripts/mkgccnewlibspec.in b/scripts/mkgccnewlibspec.in index ed28616ea9..10d48a3fb6 100644 --- a/scripts/mkgccnewlibspec.in +++ b/scripts/mkgccnewlibspec.in @@ -60,7 +60,7 @@ specfile=${dst}/${target_alias}-gcc-${gcc_version}-newlib-${newlib_version}.spec sed -e "s%@Release\@%${gccnewlib_rpm_release}%g" \ -e "s%@target_alias\@%${target_alias}%g" \ -e "s%@prefix\@%@prefix@%g" \ - -e "s%@rpm_build_root\@%${rpm_build_root}%g" \ + -e "s,@rpm_build_root\@,${rpm_build_root},g" \ -e "s%@gcc_version\@%${gcc_version}%g" \ -e "s%@gcc_patch_version\@%${gcc_patch_version}%g" \ -e "s%@newlib_version\@%${newlib_version}%g" \ diff --git a/scripts/mkgdbspec.in b/scripts/mkgdbspec.in index 3f5561a3f1..22aed37c1d 100644 --- a/scripts/mkgdbspec.in +++ b/scripts/mkgdbspec.in @@ -67,7 +67,7 @@ case ${target_alias} in esac sed -e "s%@Release\@%${gdb_rpm_release}%g" \ - -e "s%@rpm_build_root\@%${rpm_build_root}%g" \ + -e "s,@rpm_build_root\@,${rpm_build_root},g" \ -e "s%@target_alias\@%${target_alias}%g" \ -e "s%@gdb_version\@%${gdb_version}%g" \ -e "s%@gdb_patch_version\@%${gdb_patch_version}%g" \ diff --git a/scripts/setup.def b/scripts/setup.def index 27c85a3b16..5779d84a29 100644 --- a/scripts/setup.def +++ b/scripts/setup.def @@ -16,7 +16,7 @@ gdb_patch_version=20020612 gdb_rpm_release=1 rtems_version=ss-20000726 rtems_rpm_release=1 -rpm_build_root=/tmp +rpm_build_root=%{_tmppath} gcc3newlib_version=1.10.0 gcc3newlib_patch_version=20020719 gcc3_version=3.1 -- cgit v1.2.3