source: rtems/contrib/crossrpms/rtems4.10/powerpc/rtems-4.10-powerpc-rtems4.10-gdb.spec @ 59369291

4.104.115
Last change on this file since 59369291 was 59369291, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/09/09 at 12:40:23

Bump release.

  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[3f6e3fa]1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
[54726239]6%define _prefix                 /opt/rtems-4.10
7%define _exec_prefix            %{_prefix}
8%define _bindir                 %{_exec_prefix}/bin
9%define _sbindir                %{_exec_prefix}/sbin
10%define _libexecdir             %{_exec_prefix}/libexec
11%define _datarootdir            %{_prefix}/share
12%define _datadir                %{_datarootdir}
13%define _sysconfdir             %{_prefix}/etc
14%define _sharedstatedir         %{_prefix}/com
15%define _localstatedir          %{_prefix}/var
16%define _includedir             %{_prefix}/include
17%define _libdir                 %{_exec_prefix}/%{_lib}
18%define _mandir                 %{_datarootdir}/man
19%define _infodir                %{_datarootdir}/info
20%define _localedir              %{_datarootdir}/locale
[3f6e3fa]21
22%ifos cygwin cygwin32 mingw mingw32
23%define _exeext .exe
[3b35bcc5]24%define debug_package           %{nil}
25%define _libdir                 %{_exec_prefix}/lib
[3f6e3fa]26%else
27%define _exeext %{nil}
28%endif
29
30%ifos cygwin cygwin32
31%define optflags -O3 -pipe -march=i486 -funroll-loops
[3b35bcc5]32%endif
33
34%ifos mingw mingw32
35%if %{defined _mingw32_cflags}
36%define optflags %{_mingw32_cflags}
37%else
38%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
39%endif
[3f6e3fa]40%endif
41
42%if "%{_build}" != "%{_host}"
43%define _host_rpmprefix rtems-4.10-%{_host}-
44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48%define gdb_version 6.8
49%define gdb_rpmvers %{expand:%(echo 6.8 | tr - _)}
50
51Name:           rtems-4.10-powerpc-rtems4.10-gdb
52Summary:        Gdb for target powerpc-rtems4.10
53Group:          Development/Tools
54Version:        %{gdb_rpmvers}
[88ab8f3]55Release:        9%{?dist}
[3f6e3fa]56License:        GPL/LGPL
57URL:            http://sources.redhat.com/gdb
58BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
59
60BuildRequires:  %{_host_rpmprefix}gcc
61
[3b35bcc5]62%define build_sim --enable-sim
[147257d4]63%if "%{_build}" != "%{_host}"
[3b35bcc5]64# psim doesn't support Cdn-X
[147257d4]65%if "powerpc-rtems4.10" == "powerpc-rtems4.10"
[3b35bcc5]66%define build_sim --disable-sim
67%endif
[147257d4]68%endif
69
[3b35bcc5]70%ifos mingw mingw32
71# Mingw lacks functions required by the simulator
72%if "powerpc-rtems4.10" == "sparc-rtems4.10"
73%define build_sim --disable-sim
74%endif
75%if "powerpc-rtems4.10" == "h8300-rtems4.10"
76%define build_sim --disable-sim
77%endif
[59369291]78%if "powerpc-rtems4.10" == "lm32-rtems4.10"
79%define build_sim --disable-sim
80%endif
[147257d4]81%if "powerpc-rtems4.10" == "mipstx39-rtems4.10"
82%define build_sim --disable-sim
83%endif
[3b35bcc5]84%endif
85
[3f6e3fa]86%if "%{gdb_version}" >= "6.6"
87# suse
[88ab8f3]88%if "%{?suse}" >= "10.3"
[3f6e3fa]89BuildRequires: libexpat-devel
90%else
[147257d4]91# Fedora/CentOS/Cygwin/MinGW
[3f6e3fa]92BuildRequires: %{_host_rpmprefix}expat-devel
93%endif
94%endif
95
96%if "%{gdb_version}" < "6.7"
97%if "%{_build}" != "%{_host}"
98BuildRequires:  %{_host_rpmprefix}termcap-devel
99%endif
100%endif
101BuildRequires:  %{_host_rpmprefix}readline-devel
102BuildRequires:  %{_host_rpmprefix}ncurses-devel
103
104# Required for building the infos
105BuildRequires:  /sbin/install-info
106BuildRequires:  texinfo >= 4.2
107
108
109Requires:       rtems-4.10-gdb-common
110
[b38ae26b]111Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
[3b35bcc5]112Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-6.8-rtems4.10-20090122.diff
[3f6e3fa]113
114%description
115GDB for target powerpc-rtems4.10
116%prep
117%setup -q -c -T -n %{name}-%{version}
118
119%setup -q -D -T -n %{name}-%{version} -a0
120cd gdb-%{gdb_version}
121%{?PATCH0:%patch0 -p1}
122cd ..
123
124%if "%{gdb_version}" >= "6.7"
125# Force using a system-provided libreadline
126rm -f gdb-%{gdb_version}/readline/configure
127%endif
128%build
129  export PATH="%{_bindir}:${PATH}"
130  mkdir -p build
131  cd build
132%if "%{_build}" != "%{_host}"
133  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
134%endif
135  CFLAGS="$RPM_OPT_FLAGS" \
136  ../gdb-%{gdb_version}/configure \
137    --build=%_build --host=%_host \
138    --target=powerpc-rtems4.10 \
139    --verbose --disable-nls \
140    --without-included-gettext \
141    --disable-win32-registry \
142    --disable-werror \
[3b35bcc5]143    %{build_sim} \
[3f6e3fa]144%if "%{gdb_version}" >= "6.7"
145    --with-system-readline \
146%endif
147%if "%{gdb_version}" >= "6.6"
148    --with-expat \
[88ab8f3]149%endif
150%if "%{gdb_version}" >= "6.8.50"
151    --without-python \
[3f6e3fa]152%endif
153    --prefix=%{_prefix} --bindir=%{_bindir} \
154    --includedir=%{_includedir} --libdir=%{_libdir} \
155    --mandir=%{_mandir} --infodir=%{_infodir}
156
157  make %{?_smp_mflags} all
158  make info
159  cd ..
160
161%install
162  export PATH="%{_bindir}:${PATH}"
163  rm -rf $RPM_BUILD_ROOT
164
165  cd build
166  make DESTDIR=$RPM_BUILD_ROOT install
167
168  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
169  touch $RPM_BUILD_ROOT%{_infodir}/dir
170
171# These come from other packages
172  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
173  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
174  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
175
176# We don't ship host files
177  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
178
179# host library, installed to a bogus directory
180  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libpowerpc-rtems4.10-sim.a
181
182  cd ..
183
184# Extract %%__os_install_post into os_install_post~
185cat << \EOF > os_install_post~
186%__os_install_post
187EOF
188
189# Generate customized brp-*scripts
190cat os_install_post~ | while read a x y; do
191case $a in
192# Prevent brp-strip* from trying to handle foreign binaries
193*/brp-strip*)
194  b=$(basename $a)
195  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
196  chmod a+x $b
197  ;;
198# Fix up brp-compress to handle %%_prefix != /usr
199*/brp-compress*)
200  b=$(basename $a)
201  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
202  chmod a+x $b
203  ;;
204esac
205done
206
207sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
208  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
209< os_install_post~ > os_install_post
210%define __os_install_post . ./os_install_post
211
212%clean
213  rm -rf $RPM_BUILD_ROOT
214
215# ==============================================================
216# powerpc-rtems4.10-gdb
217# ==============================================================
218# %package -n rtems-4.10-powerpc-rtems4.10-gdb
219# Summary:      rtems gdb for powerpc-rtems4.10
220# Group: Development/Tools
221# %if %build_infos
222# Requires: rtems-4.10-gdb-common
223# %endif
224
225%description -n rtems-4.10-powerpc-rtems4.10-gdb
226GNU gdb targetting powerpc-rtems4.10.
227
228%files -n rtems-4.10-powerpc-rtems4.10-gdb
229%defattr(-,root,root)
230%dir %{_mandir}
231%dir %{_mandir}/man1
232%{_mandir}/man1/powerpc-rtems4.10-*.1*
233
234%dir %{_bindir}
235%{_bindir}/powerpc-rtems4.10-*
236
237# ==============================================================
238# rtems-4.10-gdb-common
239# ==============================================================
240%package -n rtems-4.10-gdb-common
241Summary:      Base package for RTEMS gdbs
242Group: Development/Tools
243Requires(post):         /sbin/install-info
244Requires(preun):        /sbin/install-info
245
246%description -n rtems-4.10-gdb-common
247
248GDB files shared by all targets.
249
250%post -n rtems-4.10-gdb-common
251  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
252  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
253  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
254  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
255
256%preun -n rtems-4.10-gdb-common
257if [ $1 -eq 0 ]; then
258  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
259  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
260  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
261  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
262fi
263
264%files -n rtems-4.10-gdb-common
265%defattr(-,root,root)
266%dir %{_infodir}
267%ghost %{_infodir}/dir
268%{_infodir}/gdb.info*
269
270%{_infodir}/gdbint.info*
271%{_infodir}/stabs.info*
272%{_infodir}/annotate.info*
273
Note: See TracBrowser for help on using the repository browser.