source: rtems/contrib/crossrpms/rtems4.9/bfin/rtems-4.9-bfin-rtems4.9-gdb.spec @ 51aac0e

4.104.114.9
Last change on this file since 51aac0e was 51aac0e, checked in by Ralf Corsepius <ralf.corsepius@…>, on Sep 28, 2007 at 7:38:40 AM

Cleanups.

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