source: rtems/scripts/gdb/gdb.add @ 0c42d6d

4.104.114.84.95
Last change on this file since 0c42d6d was e93fa77, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/05 at 08:31:58

2005-04-12 Ralf Corsepius <ralf.corsepius@…>

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