source: rtems/scripts/gdb/gdb.add @ 5c68bf8

4.104.114.84.95
Last change on this file since 5c68bf8 was 5c68bf8, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 12, 2005 at 6:14:08 AM

Add support for rpmbuild --with sources.

  • 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
23Patch0:       gdb-%{gdb_version}-rtems-@gdb_patch_version@.diff
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 -p1
65# %patch1 -p1
66# %patch2 -p1
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.