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/cpukit/.cvsignore | 4 ++ scripts/cpukit/Makefile.am | 66 ++++++++++++++++++++++++++++++++ scripts/cpukit/mkspec.in | 57 ++++++++++++++++++++++++++++ scripts/cpukit/rtems-cpukit.spec.in | 75 +++++++++++++++++++++++++++++++++++++ 4 files changed, 202 insertions(+) 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/cpukit') 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 -- cgit v1.2.3