source: rtems/contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec @ 0e6d50c

4.104.114.95
Last change on this file since 0e6d50c was 5a9f372, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/10/07 at 06:52:31

update to gdb-6.6.90.

  • Property mode set to 100644
File size: 3.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.6.90
17%define gdb_rpmvers %{expand:%(echo 6.6.90 | tr - _)}
18
19Name:           rtems-4.9-sparc-rtems4.9-gdb
20Summary:        Gdb for target sparc-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%if "sparc-rtems4.9" == "sparc-rtems4.9"
36BuildRequires:  libtermcap-devel
37%endif
38BuildRequires:  ncurses-devel
39
40Source0:        ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
41%{?_without_sources:NoSource:   0}
42%if "%{gdb_version}" == "6.5"
43Patch0:         gdb-6.5-rtems-20060713.diff
44%endif
45%if "%{gdb_version}" == "6.6"
46Patch0:         gdb-6.6-rtems4.8-20070306.diff
47%endif
48
49%description
50GDB for target sparc-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=sparc-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  cd ..
77
78%install
79  rm -rf $RPM_BUILD_ROOT
80
81  cd build
82%if "%{gdb_version}" >= "6.3"
83  make DESTDIR=$RPM_BUILD_ROOT install
84%else
85  make prefix=$RPM_BUILD_ROOT%{_prefix} \
86    bindir=$RPM_BUILD_ROOT%{_bindir} \
87    includedir=$RPM_BUILD_ROOT%{_includedir} \
88    libdir=$RPM_BUILD_ROOT%{_libdir} \
89    infodir=$RPM_BUILD_ROOT%{_infodir} \
90    mandir=$RPM_BUILD_ROOT%{_mandir} \
91    install
92
93%endif
94
95# Conflict with a native gdb's infos
96  rm -rf $RPM_BUILD_ROOT%{_infodir}
97
98# We don't ship host files
99  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
100
101%if "%{gdb_version}" >= "6.4"
102# host library, installed to a bogus directory
103  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsparc-rtems4.9-sim.a
104%endif
105
106  cd ..
107
108# Extract %%__os_install_post into os_install_post~
109cat << \EOF > os_install_post~
110%__os_install_post
111EOF
112
113# Generate customized brp-*scripts
114cat os_install_post~ | while read a x y; do
115case $a in
116# Prevent brp-strip* from trying to handle foreign binaries
117*/brp-strip*)
118  b=$(basename $a)
119  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
120  chmod a+x $b
121  ;;
122# Fix up brp-compress to handle %%_prefix != /usr
123*/brp-compress*)
124  b=$(basename $a)
125  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
126  chmod a+x $b
127  ;;
128esac
129done
130
131sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
132  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
133< os_install_post~ > os_install_post
134%define __os_install_post . ./os_install_post
135
136%clean
137  rm -rf $RPM_BUILD_ROOT
138
139# ==============================================================
140# sparc-rtems4.9-gdb
141# ==============================================================
142# %package -n rtems-4.9-sparc-rtems4.9-gdb
143# Summary:      rtems gdb for sparc-rtems4.9
144# Group: Development/Tools
145# %if %build_infos
146# Requires: rtems-4.9-gdb-common
147# %endif
148
149%description -n rtems-4.9-sparc-rtems4.9-gdb
150
151GNU gdb targetting sparc-rtems4.9.
152
153%files -n rtems-4.9-sparc-rtems4.9-gdb
154%defattr(-,root,root)
155%dir %{_mandir}
156%dir %{_mandir}/man1
157%{_mandir}/man1/sparc-rtems4.9-*.1*
158
159%dir %{_bindir}
160%{_bindir}/sparc-rtems4.9-*
161
Note: See TracBrowser for help on using the repository browser.