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 04/20/05 at 07:24:58

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
RevLine 
[cdf5ff65]1
2%define gdb_version     @gdb_version@
3%define gdb_target      @target_alias@
4
[e9166f31]5Name:         %{rpmprefix}%{gdb_target}-gdb
[df49c60]6Release:      @Release@
7License:      GPL/LGPL
[cdf5ff65]8Group:        %{rpmgroup}
[df49c60]9
[ccf76fb]10Packager:     ralf.corsepius@rtems.org and joel@OARcorp.com
[df49c60]11
[cdf5ff65]12Version:      %{gdb_version}
13Summary:      gdb for target %{gdb_version}
[2c7f0e3d]14
15%if "%{gdb_version}" < "6.0"
[c70ec42]16Source0:      ftp://ftp.gnu.org/pub/gnu/gdb-%{gdb_version}@gdb_suffix@
[2c7f0e3d]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
[c70ec42]21Source0:      ftp://ftp.gnu.org/pub/gnu/gdb-%{gdb_version}@gdb_suffix@
[0a80a16]22@PATCH1@
[2c7f0e3d]23%endif
[c86d8e7f]24
25%if "%{_vendor}" == "redhat"
26BuildPreReq:    ncurses-devel
27%endif
[df49c60]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#
[5c68bf8]40%{?!_with_sources:NoSource:      0}
[df49c60]41
[de819f6e]42#  Account as best possible for targets without simulators
43#  and targets which require extra arguments.
44%define _sim    1
45
[e9166f31]46%if "%{gdb_target}" == "avr-rtems@osversion@"
47%define _sim    0
48%endif
[cdf5ff65]49%if "%{gdb_target}" == "m68k-rtems@osversion@"
[de819f6e]50%define _sim    0
51%endif
[cdf5ff65]52%if "%{gdb_target}" == "i386-rtems@osversion@"
[de819f6e]53%define _sim    0
54%endif
[56b864e]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
[de819f6e]61
[df49c60]62
63%description
64RTEMS is an open source operating system for embedded systems.
65
[cdf5ff65]66This is the GNU gdb for RTEMS targetting %{gdb_version}.
[df49c60]67
68%prep
[f50f0cd]69%setup -c -T -n %{name}-%{version} -a0
[df49c60]70
[cdf5ff65]71cd gdb-%{gdb_version}
[0a80a16]72%{?PATCH0:%patch0 -p1}
73%{?PATCH1:%patch1 -p1}
74%{?PATCH2:%patch2 -p1}
[b64edb5b]75cd ..
[df49c60]76
77%build
[de819f6e]78%if "%_sim" == "1"
79 simargs="--enable-sim"
80%endif
81
[cdf5ff65]82%if "%{gdb_target}" == "powerpc-rtems@osversion@"
[de819f6e]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
[d8fa12c]89  mkdir -p build
[df49c60]90  cd build
[cdf5ff65]91  export PATH="%{_bindir}:${PATH}"
92  ../gdb-%{gdb_version}/configure \
[54ceffa]93    --build=%_build --host=%_host \
[cdf5ff65]94    --target=%{gdb_target} \
[3e6e43c6]95    --prefix=%{_prefix} --bindir=%{_bindir} \
[d8fa12c]96    --includedir=%{_includedir} --libdir=%{_libdir} \
[5158680]97    --mandir=%{_mandir} --infodir=%{_infodir} \
98    --verbose $simargs \
[c86d8e7f]99    --disable-nls
[df49c60]100
101  make all
102  make info
103
104%install
[56b864e]105  rm -rf $RPM_BUILD_ROOT
106
[df49c60]107  cd build
[56b864e]108  make prefix=$RPM_BUILD_ROOT%{_prefix} \
109    bindir=$RPM_BUILD_ROOT%{_bindir} \
[d8fa12c]110    includedir=$RPM_BUILD_ROOT%{_includedir} \
111    libdir=$RPM_BUILD_ROOT%{_libdir} \
[56b864e]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} \
[d8fa12c]117    includedir=$RPM_BUILD_ROOT%{_includedir} \
118    libdir=$RPM_BUILD_ROOT%{_libdir} \
[56b864e]119    infodir=$RPM_BUILD_ROOT%{_infodir} \
120    mandir=$RPM_BUILD_ROOT%{_mandir} \
121    install-info
[c86d8e7f]122
123  # host files
[d8fa12c]124  rm -rf $RPM_BUILD_ROOT%{_includedir}/*.h
125  rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*a
[df49c60]126
[c86d8e7f]127  # These come from other packages
[e9166f31]128  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
129  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
130  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
[d8fa12c]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*
[c86d8e7f]135 
[df49c60]136  # gzip info files
[e9166f31]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
[2c7f0e3d]143
[8b2642c2]144  # We don't ship info/dir
[e9166f31]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.