source: rtems/contrib/crossrpms/rtems4.10/bfin/rtems-4.10-bfin-rtems4.10-gdb.spec @ c5540a7

4.104.115
Last change on this file since c5540a7 was c5540a7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/03/09 at 03:06:11

Bump GDB_RPMREL.

  • Property mode set to 100644
File size: 5.9 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
48%define gdb_version 6.5
49%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
50
51Name:           rtems-4.10-bfin-rtems4.10-gdb
52Summary:        Gdb for target bfin-rtems4.10
53Group:          Development/Tools
54Version:        %{gdb_rpmvers}
[c5540a7]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 "bfin-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 "bfin-rtems4.10" == "sparc-rtems4.10"
73%define build_sim --disable-sim
74%endif
75%if "bfin-rtems4.10" == "h8300-rtems4.10"
76%define build_sim --disable-sim
77%endif
[e2ae590]78%if "%{gdb_version}" >= "6.8.50"
79%if "bfin-rtems4.10" == "m32c-rtems4.10"
80%define build_sim --disable-sim
81%endif
82%endif
83%if "bfin-rtems4.10" == "lm32-rtems4.10"
84%define build_sim --disable-sim
85%endif
[147257d4]86%if "bfin-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
110
111Source0:        ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
112%{?_without_sources:NoSource:   0}
[3b35bcc5]113Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/gdb-6.5-bfinrtems-20090122.diff
[3f6e3fa]114
115%description
116GDB for target bfin-rtems4.10
117%prep
118%setup -q -c -T -n %{name}-%{version}
119
120%setup -q -D -T -n %{name}-%{version} -a0
121cd gdb-%{gdb_version}
122%{?PATCH0:%patch0 -p1}
123cd ..
124
125%if "%{gdb_version}" >= "6.7"
126# Force using a system-provided libreadline
127rm -f gdb-%{gdb_version}/readline/configure
128%endif
129%build
130  export PATH="%{_bindir}:${PATH}"
131  mkdir -p build
132  cd build
133%if "%{_build}" != "%{_host}"
134  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
135%endif
136  CFLAGS="$RPM_OPT_FLAGS" \
137  ../gdb-%{gdb_version}/configure \
138    --build=%_build --host=%_host \
139    --target=bfin-rtems4.10 \
140    --verbose --disable-nls \
141    --without-included-gettext \
142    --disable-win32-registry \
143    --disable-werror \
[3b35bcc5]144    %{build_sim} \
[3f6e3fa]145%if "%{gdb_version}" >= "6.7"
146    --with-system-readline \
147%endif
148%if "%{gdb_version}" >= "6.6"
149    --with-expat \
[88ab8f3]150%endif
151%if "%{gdb_version}" >= "6.8.50"
152    --without-python \
[3f6e3fa]153%endif
154    --prefix=%{_prefix} --bindir=%{_bindir} \
155    --includedir=%{_includedir} --libdir=%{_libdir} \
156    --mandir=%{_mandir} --infodir=%{_infodir}
157
158  make %{?_smp_mflags} all
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
[cae117d9]168# Conflict with a native gdb's infos
169  rm -rf $RPM_BUILD_ROOT%{_infodir}
[3f6e3fa]170
171# We don't ship host files
172  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
173
174# host library, installed to a bogus directory
175  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libbfin-rtems4.10-sim.a
176
177  cd ..
178
179# Extract %%__os_install_post into os_install_post~
180cat << \EOF > os_install_post~
181%__os_install_post
182EOF
183
184# Generate customized brp-*scripts
185cat os_install_post~ | while read a x y; do
186case $a in
187# Prevent brp-strip* from trying to handle foreign binaries
188*/brp-strip*)
189  b=$(basename $a)
190  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
191  chmod a+x $b
192  ;;
193# Fix up brp-compress to handle %%_prefix != /usr
194*/brp-compress*)
195  b=$(basename $a)
196  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
197  chmod a+x $b
198  ;;
199esac
200done
201
202sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
203  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
204< os_install_post~ > os_install_post
205%define __os_install_post . ./os_install_post
206
207%clean
208  rm -rf $RPM_BUILD_ROOT
209
210# ==============================================================
211# bfin-rtems4.10-gdb
212# ==============================================================
213# %package -n rtems-4.10-bfin-rtems4.10-gdb
214# Summary:      rtems gdb for bfin-rtems4.10
215# Group: Development/Tools
216# %if %build_infos
217# Requires: rtems-4.10-gdb-common
218# %endif
219
220%description -n rtems-4.10-bfin-rtems4.10-gdb
221GNU gdb targetting bfin-rtems4.10.
222
223%files -n rtems-4.10-bfin-rtems4.10-gdb
224%defattr(-,root,root)
[cae117d9]225%dir %{_prefix}
226%dir %{_prefix}/share
227
[3f6e3fa]228%dir %{_mandir}
229%dir %{_mandir}/man1
230%{_mandir}/man1/bfin-rtems4.10-*.1*
231
232%dir %{_bindir}
233%{_bindir}/bfin-rtems4.10-*
234
Note: See TracBrowser for help on using the repository browser.