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

4.104.114.84.95
Last change on this file since b64edb5b was b64edb5b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/05 at 06:37:51

Apply patches in tool subdirs.

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