source: rtems/scripts/gdb/gdb.add @ 56b864e

4.104.114.84.95
Last change on this file since 56b864e was 56b864e, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 13, 2005 at 4:11:30 PM

Various changes and hacks

  • Property mode set to 100644
File size: 3.7 KB
Line 
1
2%define gdb_version     @gdb_version@
3%define gdb_target      @target_alias@
4
5Name:         %{rpmprefix}%{gdb_target}-gdb
6Release:      @Release@
7License:      GPL/LGPL
8Group:        %{rpmgroup}
9
10Packager:     ralf.corsepius@rtems.org 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}@gdb_suffix@
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}@gdb_suffix@
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}" == "avr-rtems@osversion@"
47%define _sim    0
48%endif
49%if "%{gdb_target}" == "m68k-rtems@osversion@"
50%define _sim    0
51%endif
52%if "%{gdb_target}" == "i386-rtems@osversion@"
53%define _sim    0
54%endif
55%if "%{gdb_target}" == "powerpc-rtems@osversion@"
56%define _sim    0
57%endif
58%if "%{gdb_target}" == "sparc-rtems@osversion@"
59%define _sim    0
60%endif
61
62
63%description
64RTEMS is an open source operating system for embedded systems.
65
66This is the GNU gdb for RTEMS targetting %{gdb_version}.
67
68%prep
69%setup -c -T -n %{name}-%{version} -a0
70
71cd gdb-%{gdb_version}
72%{?PATCH0:%patch0 -p1}
73%{?PATCH1:%patch1 -p1}
74%{?PATCH2:%patch2 -p1}
75cd ..
76
77%build
78%if "%_sim" == "1"
79 simargs="--enable-sim"
80%endif
81
82%if "%{gdb_target}" == "powerpc-rtems@osversion@"
83 simargs="$simargs --enable-sim-timebase --enable-sim-hardware"
84 #  Enabling this causes the program image to be huge and causes
85 #  some gcc/hosts combinations to run out of memory.
86 # simargs="$simargs --enable-sim-inline"
87%endif
88
89test -d build || mkdir build
90  cd build
91  export PATH="%{_bindir}:${PATH}"
92  ../gdb-%{gdb_version}/configure \
93    --build=%_build --host=%_host \
94    --target=%{gdb_target} \
95    --prefix=%{_prefix} --bindir=%{_bindir} \
96    --mandir=%{_mandir} --infodir=%{_infodir} \
97    --verbose $simargs \
98    --disable-nls
99
100  make all
101  make info
102
103%install
104  rm -rf $RPM_BUILD_ROOT
105
106  cd build
107  make prefix=$RPM_BUILD_ROOT%{_prefix} \
108    bindir=$RPM_BUILD_ROOT%{_bindir} \
109    infodir=$RPM_BUILD_ROOT%{_infodir} \
110    mandir=$RPM_BUILD_ROOT%{_mandir} \
111    install
112  make prefix=$RPM_BUILD_ROOT%{_prefix} \
113    bindir=$RPM_BUILD_ROOT%{_bindir} \
114    infodir=$RPM_BUILD_ROOT%{_infodir} \
115    mandir=$RPM_BUILD_ROOT%{_mandir} \
116    install-info
117
118  # host files
119  rm -rf $RPM_BUILD_ROOT%{_prefix}/include/*.h
120  rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/lib*a
121
122  # These come from other packages
123  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
124  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
125  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
126 
127  # gzip info files
128  ls $RPM_BUILD_ROOT%{_infodir}/*.info \
129    $RPM_BUILD_ROOT%{_infodir}/*.info-? \
130    $RPM_BUILD_ROOT%{_infodir}/*.info-?? \
131  | while read a; do \
132    gzip -9qf $a 2>/dev/null; \
133  done
134
135  # We don't ship info/dir
136  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
137
138  # gzip man pages
139  gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
Note: See TracBrowser for help on using the repository browser.