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

4.104.114.84.95
Last change on this file since d8fa12c was d8fa12c, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 20, 2005 at 7:24:58 AM

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

  • gdb/base-gdb.add, gdb/gdb.add, gdb/target-gdb.add: Use mkdir -p. Introduce %{_includedir}, %{_libdir}. Remove superfluous %doc.
  • Property mode set to 100644
File size: 4.0 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
89  mkdir -p 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    --includedir=%{_includedir} --libdir=%{_libdir} \
97    --mandir=%{_mandir} --infodir=%{_infodir} \
98    --verbose $simargs \
99    --disable-nls
100
101  make all
102  make info
103
104%install
105  rm -rf $RPM_BUILD_ROOT
106
107  cd build
108  make prefix=$RPM_BUILD_ROOT%{_prefix} \
109    bindir=$RPM_BUILD_ROOT%{_bindir} \
110    includedir=$RPM_BUILD_ROOT%{_includedir} \
111    libdir=$RPM_BUILD_ROOT%{_libdir} \
112    infodir=$RPM_BUILD_ROOT%{_infodir} \
113    mandir=$RPM_BUILD_ROOT%{_mandir} \
114    install
115  make prefix=$RPM_BUILD_ROOT%{_prefix} \
116    bindir=$RPM_BUILD_ROOT%{_bindir} \
117    includedir=$RPM_BUILD_ROOT%{_includedir} \
118    libdir=$RPM_BUILD_ROOT%{_libdir} \
119    infodir=$RPM_BUILD_ROOT%{_infodir} \
120    mandir=$RPM_BUILD_ROOT%{_mandir} \
121    install-info
122
123  # host files
124  rm -rf $RPM_BUILD_ROOT%{_includedir}/*.h
125  rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*a
126
127  # These come from other packages
128  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
129  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
130  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
131
132  # gdb 4.18 installed this, later versions don't
133  # Don't care about it, anymore
134  rm -rf $RPM_BUILD_ROOT%{_infodir}/readline.info*
135 
136  # gzip info files
137  ls $RPM_BUILD_ROOT%{_infodir}/*.info \
138    $RPM_BUILD_ROOT%{_infodir}/*.info-? \
139    $RPM_BUILD_ROOT%{_infodir}/*.info-?? \
140  | while read a; do \
141    gzip -9qf $a 2>/dev/null; \
142  done
143
144  # We don't ship info/dir
145  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
146
147  # gzip man pages
148  gzip -9qf $RPM_BUILD_ROOT%{_mandir}/man?/*.? 2>/dev/null
Note: See TracBrowser for help on using the repository browser.