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

4.104.115
Last change on this file since 8ffd16bb was 8ffd16bb, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/23/08 at 07:00:55

newlib-1.17.0

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