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

4.104.115
Last change on this file since a707320 was a707320, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/03/09 at 01:59:29

Regenerate.

  • Property mode set to 100644
File size: 7.8 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}"
[6d3f0321]43%define _host_rpmprefix %{_host}-
[3f6e3fa]44%else
45%define _host_rpmprefix %{nil}
46%endif
47
[ccadb684]48%define gdb_version 6.8.50.20090902
49%define gdb_rpmvers %{expand:%(echo 6.8.50.20090902 | tr - _)}
[3f6e3fa]50
51Name:           rtems-4.10-powerpc-rtems4.10-gdb
52Summary:        Gdb for target powerpc-rtems4.10
53Group:          Development/Tools
54Version:        %{gdb_rpmvers}
[a707320]55Release:        1%{?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
[fb0a7e9]78%if "%{gdb_version}" >= "6.8.50"
79%if "powerpc-rtems4.10" == "m32c-rtems4.10"
80%define build_sim --disable-sim
81%endif
82%endif
[59369291]83%if "powerpc-rtems4.10" == "lm32-rtems4.10"
84%define build_sim --disable-sim
85%endif
[147257d4]86%if "powerpc-rtems4.10" == "mipstx39-rtems4.10"
87%define build_sim --disable-sim
88%endif
[3b35bcc5]89%endif
90
[3f6e3fa]91%if "%{gdb_version}" >= "6.6"
92# suse
[88ab8f3]93%if "%{?suse}" >= "10.3"
[3f6e3fa]94BuildRequires: libexpat-devel
95%else
[147257d4]96# Fedora/CentOS/Cygwin/MinGW
[3f6e3fa]97BuildRequires: %{_host_rpmprefix}expat-devel
98%endif
99%endif
100
101%if "%{gdb_version}" < "6.7"
102%if "%{_build}" != "%{_host}"
103BuildRequires:  %{_host_rpmprefix}termcap-devel
104%endif
105%endif
106BuildRequires:  %{_host_rpmprefix}readline-devel
107BuildRequires:  %{_host_rpmprefix}ncurses-devel
108
109# Required for building the infos
110BuildRequires:  /sbin/install-info
111BuildRequires:  texinfo >= 4.2
112
113
114Requires:       rtems-4.10-gdb-common
115
[ccadb684]116# A copy of a gdb development snapshot having been retrieved from
117# ftp://sources.redhat.com/pub/gdb/snapshots/current/gdb-%{gdb_version}.tar.bz2
118Source0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-%{gdb_version}.tar.bz2
119Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-%{gdb_version}-rtems4.10-20090902.diff
[3f6e3fa]120
121%description
122GDB for target powerpc-rtems4.10
123%prep
124%setup -q -c -T -n %{name}-%{version}
125
126%setup -q -D -T -n %{name}-%{version} -a0
127cd gdb-%{gdb_version}
128%{?PATCH0:%patch0 -p1}
129cd ..
130
131%if "%{gdb_version}" >= "6.7"
132# Force using a system-provided libreadline
133rm -f gdb-%{gdb_version}/readline/configure
134%endif
135%build
136  export PATH="%{_bindir}:${PATH}"
137  mkdir -p build
138  cd build
139%if "%{_build}" != "%{_host}"
140  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
141%endif
142  CFLAGS="$RPM_OPT_FLAGS" \
143  ../gdb-%{gdb_version}/configure \
144    --build=%_build --host=%_host \
145    --target=powerpc-rtems4.10 \
146    --verbose --disable-nls \
147    --without-included-gettext \
148    --disable-win32-registry \
149    --disable-werror \
[3b35bcc5]150    %{build_sim} \
[3f6e3fa]151%if "%{gdb_version}" >= "6.7"
152    --with-system-readline \
153%endif
154%if "%{gdb_version}" >= "6.6"
155    --with-expat \
[88ab8f3]156%endif
157%if "%{gdb_version}" >= "6.8.50"
158    --without-python \
[3f6e3fa]159%endif
160    --prefix=%{_prefix} --bindir=%{_bindir} \
161    --includedir=%{_includedir} --libdir=%{_libdir} \
162    --mandir=%{_mandir} --infodir=%{_infodir}
163
164  make %{?_smp_mflags} all
165  make info
166  cd ..
167
168%install
169  export PATH="%{_bindir}:${PATH}"
170  rm -rf $RPM_BUILD_ROOT
171
172  cd build
173  make DESTDIR=$RPM_BUILD_ROOT install
174
175  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
176  touch $RPM_BUILD_ROOT%{_infodir}/dir
177
178# These come from other packages
179  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
180  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
181  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
182
183# We don't ship host files
184  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
185
186# host library, installed to a bogus directory
187  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libpowerpc-rtems4.10-sim.a
188
189  cd ..
190
191# Extract %%__os_install_post into os_install_post~
192cat << \EOF > os_install_post~
193%__os_install_post
194EOF
195
196# Generate customized brp-*scripts
197cat os_install_post~ | while read a x y; do
198case $a in
199# Prevent brp-strip* from trying to handle foreign binaries
200*/brp-strip*)
201  b=$(basename $a)
202  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
203  chmod a+x $b
204  ;;
205# Fix up brp-compress to handle %%_prefix != /usr
206*/brp-compress*)
207  b=$(basename $a)
208  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
209  chmod a+x $b
210  ;;
211esac
212done
213
214sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
215  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
216< os_install_post~ > os_install_post
217%define __os_install_post . ./os_install_post
218
219%clean
220  rm -rf $RPM_BUILD_ROOT
221
222# ==============================================================
223# powerpc-rtems4.10-gdb
224# ==============================================================
225# %package -n rtems-4.10-powerpc-rtems4.10-gdb
226# Summary:      rtems gdb for powerpc-rtems4.10
227# Group: Development/Tools
228# %if %build_infos
229# Requires: rtems-4.10-gdb-common
230# %endif
231
232%description -n rtems-4.10-powerpc-rtems4.10-gdb
233GNU gdb targetting powerpc-rtems4.10.
234
235%files -n rtems-4.10-powerpc-rtems4.10-gdb
236%defattr(-,root,root)
[cae117d9]237%dir %{_prefix}
238%dir %{_prefix}/share
239
[3f6e3fa]240%dir %{_mandir}
241%dir %{_mandir}/man1
242%{_mandir}/man1/powerpc-rtems4.10-*.1*
243
244%dir %{_bindir}
245%{_bindir}/powerpc-rtems4.10-*
246
247# ==============================================================
248# rtems-4.10-gdb-common
249# ==============================================================
250%package -n rtems-4.10-gdb-common
251Summary:      Base package for RTEMS gdbs
252Group: Development/Tools
253Requires(post):         /sbin/install-info
254Requires(preun):        /sbin/install-info
[cae117d9]255%{?_with_noarch_subpackages:BuildArch: noarch}
[3f6e3fa]256
257%description -n rtems-4.10-gdb-common
258
259GDB files shared by all targets.
260
261%post -n rtems-4.10-gdb-common
262  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
263  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
264  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
265  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
266
267%preun -n rtems-4.10-gdb-common
268if [ $1 -eq 0 ]; then
269  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
270  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
271  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
272  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
273fi
274
275%files -n rtems-4.10-gdb-common
276%defattr(-,root,root)
[cae117d9]277%dir %{_prefix}
278%dir %{_prefix}/share
279
[3f6e3fa]280%dir %{_infodir}
281%ghost %{_infodir}/dir
282%{_infodir}/gdb.info*
283
284%{_infodir}/gdbint.info*
285%{_infodir}/stabs.info*
286%{_infodir}/annotate.info*
287
Note: See TracBrowser for help on using the repository browser.