source: rtems/contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gdb.spec @ 6d77c8f5

4.104.114.95
Last change on this file since 6d77c8f5 was 6d77c8f5, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/04/07 at 09:28:35

regenerate

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