source: rtems/contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec @ df16b8bf

4.104.114.9
Last change on this file since df16b8bf was df16b8bf, checked in by Ralf Corsepius <ralf.corsepius@…>, on Oct 11, 2007 at 8:31:50 AM

gdb-6.7

  • Property mode set to 100644
File size: 6.0 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.9
7%define _infodir                %{_prefix}/info
8%define _mandir                 %{_prefix}/man
9
10%ifos cygwin cygwin32 mingw mingw32
11%define _exeext .exe
12%else
13%define _exeext %{nil}
14%endif
15
16%define gdb_version 6.7
17%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)}
18
19Name:           rtems-4.9-sparc-rtems4.9-gdb
20Summary:        Gdb for target sparc-rtems4.9
21Group:          Development/Tools
22Version:        %{gdb_rpmvers}
23Release:        1%{?dist}
24License:        GPL/LGPL
25URL:            http://sources.redhat.com/gdb
26BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
27
28%if "%{gdb_version}" >= "6.6"
29%if "%{?suse}"
30BuildRequires:  expat
31%else 
32BuildRequires:  expat-devel
33%endif
34%endif
35# Required for building the infos
36BuildRequires:  /sbin/install-info
37BuildRequires:  texinfo >= 4.2
38%if "sparc-rtems4.9" == "sparc-rtems4.9"
39BuildRequires:  libtermcap-devel
40%endif
41BuildRequires:  ncurses-devel
42
43Requires:       rtems-4.9-gdb-common
44
45Source0:        ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
46%{?_without_sources:NoSource:   0}
47%if "%{gdb_version}" == "6.5"
48Patch0:         gdb-6.5-rtems-20060713.diff
49%endif
50%if "%{gdb_version}" == "6.6"
51Patch0:         gdb-6.6-rtems4.8-20070306.diff
52%endif
53%if "%{gdb_version}" == "6.7"
54Patch0:         gdb-6.7-rtems4.9-20071011.diff
55%endif
56
57%description
58GDB for target sparc-rtems4.9
59%prep
60%setup -q -c -T -n %{name}-%{version}
61
62%setup -q -D -T -n %{name}-%{version} -a0
63cd gdb-%{gdb_version}
64%{?PATCH0:%patch0 -p1}
65cd ..
66
67%build
68  mkdir -p build
69  cd build
70  CFLAGS="$RPM_OPT_FLAGS" \
71  ../gdb-%{gdb_version}/configure \
72    --build=%_build --host=%_host \
73    --target=sparc-rtems4.9 \
74    --verbose --disable-nls \
75    --without-included-gettext \
76    --disable-win32-registry \
77    --disable-werror \
78    --enable-sim \
79    --prefix=%{_prefix} --bindir=%{_bindir} \
80    --includedir=%{_includedir} --libdir=%{_libdir} \
81    --mandir=%{_mandir} --infodir=%{_infodir}
82
83  make all
84  make info
85  cd ..
86
87%install
88  rm -rf $RPM_BUILD_ROOT
89
90  cd build
91%if "%{gdb_version}" >= "6.3"
92  make DESTDIR=$RPM_BUILD_ROOT install
93%else
94  make prefix=$RPM_BUILD_ROOT%{_prefix} \
95    bindir=$RPM_BUILD_ROOT%{_bindir} \
96    includedir=$RPM_BUILD_ROOT%{_includedir} \
97    libdir=$RPM_BUILD_ROOT%{_libdir} \
98    infodir=$RPM_BUILD_ROOT%{_infodir} \
99    mandir=$RPM_BUILD_ROOT%{_mandir} \
100    install
101
102  make prefix=$RPM_BUILD_ROOT%{_prefix} \
103    bindir=$RPM_BUILD_ROOT%{_bindir} \
104    includedir=$RPM_BUILD_ROOT%{_includedir} \
105    libdir=$RPM_BUILD_ROOT%{_libdir} \
106    infodir=$RPM_BUILD_ROOT%{_infodir} \
107    mandir=$RPM_BUILD_ROOT%{_mandir} \
108    install-info
109%endif
110
111  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
112  touch $RPM_BUILD_ROOT%{_infodir}/dir
113
114# These come from other packages
115  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
116  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
117  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
118
119# We don't ship host files
120  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
121
122%if "%{gdb_version}" >= "6.4"
123# host library, installed to a bogus directory
124  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsparc-rtems4.9-sim.a
125%endif
126
127  cd ..
128
129# Extract %%__os_install_post into os_install_post~
130cat << \EOF > os_install_post~
131%__os_install_post
132EOF
133
134# Generate customized brp-*scripts
135cat os_install_post~ | while read a x y; do
136case $a in
137# Prevent brp-strip* from trying to handle foreign binaries
138*/brp-strip*)
139  b=$(basename $a)
140  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
141  chmod a+x $b
142  ;;
143# Fix up brp-compress to handle %%_prefix != /usr
144*/brp-compress*)
145  b=$(basename $a)
146  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
147  chmod a+x $b
148  ;;
149esac
150done
151
152sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
153  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
154< os_install_post~ > os_install_post
155%define __os_install_post . ./os_install_post
156
157%clean
158  rm -rf $RPM_BUILD_ROOT
159
160# ==============================================================
161# sparc-rtems4.9-gdb
162# ==============================================================
163# %package -n rtems-4.9-sparc-rtems4.9-gdb
164# Summary:      rtems gdb for sparc-rtems4.9
165# Group: Development/Tools
166# %if %build_infos
167# Requires: rtems-4.9-gdb-common
168# %endif
169
170%description -n rtems-4.9-sparc-rtems4.9-gdb
171
172GNU gdb targetting sparc-rtems4.9.
173
174%files -n rtems-4.9-sparc-rtems4.9-gdb
175%defattr(-,root,root)
176%dir %{_mandir}
177%dir %{_mandir}/man1
178%{_mandir}/man1/sparc-rtems4.9-*.1*
179
180%dir %{_bindir}
181%{_bindir}/sparc-rtems4.9-*
182
183# ==============================================================
184# rtems-4.9-gdb-common
185# ==============================================================
186%package -n rtems-4.9-gdb-common
187Summary:      Base package for RTEMS gdbs
188Group: Development/Tools
189Requires(post):         /sbin/install-info
190Requires(preun):        /sbin/install-info
191
192%description -n rtems-4.9-gdb-common
193
194GDB files shared by all targets.
195
196%post -n rtems-4.9-gdb-common
197  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
198%if "%{gdb_version}" < "6.3"
199  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
200%endif
201  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
202  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
203  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
204
205%preun -n rtems-4.9-gdb-common
206if [ $1 -eq 0 ]; then
207  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
208%if "%{gdb_version}" < "6.3"
209  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
210%endif
211  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
212  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
213  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
214fi
215
216%files -n rtems-4.9-gdb-common
217%defattr(-,root,root)
218%dir %{_infodir}
219%ghost %{_infodir}/dir
220%{_infodir}/gdb.info*
221
222# FIXME: When had mmalloc.info been removed?
223%if "%{gdb_version}" < "6.3"
224%{_infodir}/mmalloc.info*
225%endif
226%{_infodir}/gdbint.info*
227%{_infodir}/stabs.info*
228%{_infodir}/annotate.info*
229
Note: See TracBrowser for help on using the repository browser.