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

4.104.115
Last change on this file since 88ab8f3 was 88ab8f3, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 24, 2009 at 9:10:23 AM

Regenerate, fix spec file.

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