source: rtems/contrib/crossrpms/rtems4.8/mipstx39/rtems-4.8-mipstx39-rtems4.8-gdb.spec @ cfa08cf

4.8
Last change on this file since cfa08cf was cfa08cf, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/10/07 at 07:05:17

Regenerate.

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