source: rtems/scripts/gdb/gdb.add @ de819f6e

4.104.114.84.95
Last change on this file since de819f6e was de819f6e, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 10, 2003 at 4:32:27 PM

2003-02-10 Joel Sherrill <joel@…>

  • gdb/gdb.add, gdb/mkspec.in, gdb/target-gdb.add: Use RPM logic to determine which targets have simulators, configure with appropriate arguments, and package the correct files.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1Name:         @target_alias@-gdb-collection
2Release:      @Release@
3License:      GPL/LGPL
4Group:        rtems
5
6Autoreqprov:  on
7Packager:     corsepiu@faw.uni-ulm.de and joel@OARcorp.com
8
9Version:      @gdb_version@
10Summary:      gdb for target @target_alias@
11Source0:      ftp://ftp.gnu.org/pub/gnu/gdb-@gdb_version@.tar.gz
12Patch0:       gdb-@gdb_version@-rtems-base-@gdb_patch_version@.diff
13Patch1:       gdb-@gdb_version@-rtems-cg-@gdb_patch_version@.diff
14Patch2:       gdb-@gdb_version@-rtems-rdbg-@gdb_patch_version@.diff
15
16%if "%{_vendor}" == "redhat"
17BuildPreReq:    ncurses-devel
18%endif
19
20#
21# The original sources are not included in the source RPM.
22# If we included them, then the source RPMs for each target
23# would duplicate MBs of source unnecessarily.  This is
24# a duplication of over 30 MBs of source for each of
25# the more than 10 targets it is possible to build.
26#
27# You can get them yourself from the Internet and copy them to
28# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
29# Or you can try the ftp options of rpm :-)
30#
31NoSource:      0
32
33#  Account as best possible for targets without simulators
34#  and targets which require extra arguments.
35%define _sim    1
36
37%if "@target_alias@" == "m68k-rtems"
38%define _sim    0
39%endif
40%if "@target_alias@" == "i386-rtems"
41%define _sim    0
42%endif
43
44
45%description
46RTEMS is an open source operating system for embedded systems.
47
48This is the GNU gdb for RTEMS targetting @target_alias@.
49
50%prep
51# untar the sources inside @target_alias@-gdb
52%setup -c -n @target_alias@-gdb -a 0
53
54cd gdb-@gdb_version@
55%patch0 -p1
56%patch1 -p1
57%patch2 -p1
58
59%build
60%if "%_sim" == "1"
61 simargs="--enable-sim"
62%endif
63
64%if "@target_alias@" == "powerpc-rtems"
65 simargs="$simargs --enable-sim-timebase --enable-sim-hardware"
66 #  Enabling this causes the program image to be huge and causes
67 #  some gcc/hosts combinations to run out of memory.
68 # simargs="$simargs --enable-sim-inline"
69%endif
70
71test -d build || mkdir build
72  cd build
73  ../gdb-@gdb_version@/configure \
74    --build=%_build --host=%_host \
75    --target=@target_alias@ \
76    --verbose --prefix=%{_prefix} $simargs \
77    --disable-nls
78
79  make all
80  make info
81
82%install
83  cd build
84  make prefix=$RPM_BUILD_ROOT%{_prefix} install
85  make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
86
87  # host files
88  rm -rf $RPM_BUILD_ROOT%{_prefix}/include/*.h
89  rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/lib*a
90
91  # These come from other packages
92  rm -rf $RPM_BUILD_ROOT%{_prefix}/info/bfd*
93  rm -rf $RPM_BUILD_ROOT%{_prefix}/info/configure*
94  rm -rf $RPM_BUILD_ROOT%{_prefix}/info/standards*
95 
96  # gzip info files
97  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
98  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null
99  gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null
Note: See TracBrowser for help on using the repository browser.