source: rtems/scripts/rtems/rtems.spec.in @ b41a0d1

4.104.114.84.95
Last change on this file since b41a0d1 was b41a0d1, checked in by Joel Sherrill <joel.sherrill@…>, on 11/22/99 at 14:30:41

RTEMS RPM basically working.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1#
2# spec file for package rtems
3#
4# Copyright  (c)  1999  OARCorp, Huntsville, AL
5#
6# please send bugfixes or comments to joel@OARcorp.com
7#
8
9Vendor:       OAR Corporation
10Distribution: Linux
11Name:         rtems-@target_alias@-@bsp@
12Release:      @Release@
13Copyright:    1999 OARCorp
14Group:        unsorted
15Provides:     rtems-@target_alias@-@bsp@
16
17Autoreqprov:  on
18Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
19Requires:       @target_alias@-binutils
20Requires:       @target_alias@-gcc
21
22Version:      @rtems_version@
23Summary:      A free operating system for embedded systems
24Source:       rtems-@rtems_version@.tar.gz
25#
26# The original sources are not included in the source RPM.
27# If we included them, then the source RPMs for each target
28# would duplicate MBs of source unnecessarily.  This is
29# a duplication of over 30 MBs of source for each of
30# the more than 10 targets it is possible to build.
31#
32# You can get them yourself from the Internet and copy them to
33# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
34# Or you can try the ftp options of rpm :-)
35#
36NoSource:      0
37# We claim to be relocatible, but in fact we are not
38Prefix:       /opt
39Buildroot:    @rpm_build_root@
40
41%description
42RTEMS is a free operating system for embedded systems.
43
44Authors:
45--------
46    Joel Sherrill (joel@oarcorp.com)
47    ...
48
49%prep
50# untar the sources inside rtems-@target_alias@-@bsp@-@rtems_version@
51%setup -c -n rtems-@target_alias@-@bsp@-@rtems_version@
52# no patch needed
53# %patch
54%build
55# rtems does not support building inside the source tree
56  if test ! -f rtems-@rtems_version@/configure;
57  then
58  ( cd rtems-@rtems_version@; ./bootstrap )
59  fi 
60  ./rtems-@rtems_version@/configure \
61  --target=@target_alias@ \
62  --prefix=/opt/rtems/@target_alias@ \
63  --enable-networking \
64  --enable-posix \
65  --enable-cxx \
66  --disable-tests \
67  --enable-rdbg \
68  --disable-multiprocessing \
69  --disable-itron
70  make RTEMS_BSP=@bsp@
71%install
72  make RTEMS_BSP=@bsp@ prefix=$RPM_BUILD_ROOT/opt/rtems/@target_alias@ install
73  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type d | \
74    sed "s,^$RPM_BUILD_ROOT,%dir ,g" > files
75  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type f | \
76    sed "s,^$RPM_BUILD_ROOT,,g" >> files
77  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type d | \
78    sed "s,^$RPM_BUILD_ROOT,%dir ,g" >> files
79  find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type f | \
80    sed "s,^$RPM_BUILD_ROOT,,g" >> files
81
82%post
83  if test "$RPM_INSTALL_PREFIX" != "/opt/";
84  then
85    if test -f $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg;
86    then
87    sed -e 's,/opt/rtems/,$RPM_INSTALL_PREFIX/rtems,g' \
88      < $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg \
89      > $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~
90    mv $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~ \
91      $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg
92    fi
93  fi
94
95%files -f files
Note: See TracBrowser for help on using the repository browser.