source: rtems/contrib/crossrpms/rtems4.10/m32c/rtems-4.10-m32c-rtems4.10-gdb.spec @ b38ae26b

4.104.115
Last change on this file since b38ae26b was b38ae26b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/03/08 at 03:41:40

Regenerate.

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