This commit is contained in:
Ralf Corsepius
2007-08-09 03:05:00 +00:00
parent 6ed5f7555a
commit e90748fd18
10 changed files with 2255 additions and 0 deletions

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-arm-rtems4.8-gdb
Summary: Gdb for target arm-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "arm-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target arm-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=arm-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libarm-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# arm-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-arm-rtems4.8-gdb
# Summary: rtems gdb for arm-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-arm-rtems4.8-gdb
GNU gdb targetting arm-rtems4.8.
%files -n rtems-4.8-arm-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/arm-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/arm-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-avr-rtems4.8-gdb
Summary: Gdb for target avr-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "avr-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target avr-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=avr-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libavr-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# avr-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-avr-rtems4.8-gdb
# Summary: rtems gdb for avr-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-avr-rtems4.8-gdb
GNU gdb targetting avr-rtems4.8.
%files -n rtems-4.8-avr-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/avr-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/avr-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,221 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-bfin-rtems4.8-gdb
Summary: Gdb for target bfin-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "bfin-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
Patch0: gdb-6.5-bfinrtems-20060810a.diff
%description
GDB for target bfin-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=bfin-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libbfin-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# bfin-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-bfin-rtems4.8-gdb
# Summary: rtems gdb for bfin-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-bfin-rtems4.8-gdb
GNU gdb targetting bfin-rtems4.8.
%files -n rtems-4.8-bfin-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/bfin-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/bfin-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-h8300-rtems4.8-gdb
Summary: Gdb for target h8300-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "h8300-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target h8300-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=h8300-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libh8300-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# h8300-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-h8300-rtems4.8-gdb
# Summary: rtems gdb for h8300-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-h8300-rtems4.8-gdb
GNU gdb targetting h8300-rtems4.8.
%files -n rtems-4.8-h8300-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/h8300-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/h8300-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-i386-rtems4.8-gdb
Summary: Gdb for target i386-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "i386-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target i386-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=i386-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libi386-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# i386-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-i386-rtems4.8-gdb
# Summary: rtems gdb for i386-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-i386-rtems4.8-gdb
GNU gdb targetting i386-rtems4.8.
%files -n rtems-4.8-i386-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/i386-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/i386-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-m68k-rtems4.8-gdb
Summary: Gdb for target m68k-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "m68k-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target m68k-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=m68k-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libm68k-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# m68k-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-m68k-rtems4.8-gdb
# Summary: rtems gdb for m68k-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-m68k-rtems4.8-gdb
GNU gdb targetting m68k-rtems4.8.
%files -n rtems-4.8-m68k-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/m68k-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/m68k-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-mips-rtems4.8-gdb
Summary: Gdb for target mips-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "mips-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target mips-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=mips-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmips-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# mips-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-mips-rtems4.8-gdb
# Summary: rtems gdb for mips-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-mips-rtems4.8-gdb
GNU gdb targetting mips-rtems4.8.
%files -n rtems-4.8-mips-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/mips-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/mips-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-powerpc-rtems4.8-gdb
Summary: Gdb for target powerpc-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "powerpc-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target powerpc-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=powerpc-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libpowerpc-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# powerpc-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-powerpc-rtems4.8-gdb
# Summary: rtems gdb for powerpc-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-powerpc-rtems4.8-gdb
GNU gdb targetting powerpc-rtems4.8.
%files -n rtems-4.8-powerpc-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/powerpc-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/powerpc-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-sh-rtems4.8-gdb
Summary: Gdb for target sh-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "sh-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target sh-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=sh-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsh-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# sh-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-sh-rtems4.8-gdb
# Summary: rtems gdb for sh-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-sh-rtems4.8-gdb
GNU gdb targetting sh-rtems4.8.
%files -n rtems-4.8-sh-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/sh-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/sh-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*

View File

@@ -0,0 +1,226 @@
#
# Please send bugfixes or comments to
# http://www.rtems.org/bugzilla
#
%define _prefix /opt/rtems-4.8
%define _infodir %{_prefix}/info
%define _mandir %{_prefix}/man
%ifos cygwin cygwin32 mingw mingw32
%define _exeext .exe
%else
%define _exeext %{nil}
%endif
%define gdb_version 6.5
%define gdb_rpmvers %{expand:%(echo 6.5 | tr - _)}
Name: rtems-4.8-sparc-rtems4.8-gdb
Summary: Gdb for target sparc-rtems4.8
Group: Development/Tools
Version: %{gdb_rpmvers}
Release: 2%{?dist}
License: GPL/LGPL
URL: http://sources.redhat.com/gdb
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if "%{gdb_version}" >= "6.6"
%if "%{?suse}"
BuildRequires: expat
%else
BuildRequires: expat-devel
%endif
%endif
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%if "sparc-rtems4.8" == "sparc-rtems4.8"
BuildRequires: libtermcap-devel
%endif
BuildRequires: ncurses-devel
Requires: rtems-4.8-gdb-common
Source0: ftp://ftp.gnu.org/pub/gnu/gdb/gdb-%{gdb_version}.tar.bz2
%{?_without_sources:NoSource: 0}
%if "%{gdb_version}" == "6.5"
Patch0: gdb-6.5-rtems-20060713.diff
%endif
%if "%{gdb_version}" == "6.6"
Patch0: gdb-6.6-rtems4.8-20070306.diff
%endif
%description
GDB for target sparc-rtems4.8
%prep
%setup -q -c -T -n %{name}-%{version}
%setup -q -D -T -n %{name}-%{version} -a0
cd gdb-%{gdb_version}
%{?PATCH0:%patch0 -p1}
cd ..
%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
--target=sparc-rtems4.8 \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--enable-sim \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
make all
make info
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build
%if "%{gdb_version}" >= "6.3"
make DESTDIR=$RPM_BUILD_ROOT install
%else
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install
make prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
infodir=$RPM_BUILD_ROOT%{_infodir} \
mandir=$RPM_BUILD_ROOT%{_mandir} \
install-info
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir
# These come from other packages
rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
# We don't ship host files
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
%if "%{gdb_version}" >= "6.4"
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsparc-rtems4.8-sim.a
%endif
cd ..
# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF
# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
b=$(basename $a)
sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
chmod a+x $b
;;
# Fix up brp-compress to handle %%_prefix != /usr
*/brp-compress*)
b=$(basename $a)
sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
< os_install_post~ > os_install_post
%define __os_install_post . ./os_install_post
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# sparc-rtems4.8-gdb
# ==============================================================
# %package -n rtems-4.8-sparc-rtems4.8-gdb
# Summary: rtems gdb for sparc-rtems4.8
# Group: Development/Tools
# %if %build_infos
# Requires: rtems-4.8-gdb-common
# %endif
%description -n rtems-4.8-sparc-rtems4.8-gdb
GNU gdb targetting sparc-rtems4.8.
%files -n rtems-4.8-sparc-rtems4.8-gdb
%defattr(-,root,root)
%dir %{_mandir}
%dir %{_mandir}/man1
%{_mandir}/man1/sparc-rtems4.8-*.1*
%dir %{_bindir}
%{_bindir}/sparc-rtems4.8-*
# ==============================================================
# rtems-4.8-gdb-common
# ==============================================================
%package -n rtems-4.8-gdb-common
Summary: Base package for RTEMS gdbs
Group: Development/Tools
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description -n rtems-4.8-gdb-common
GDB files shared by all targets.
%post -n rtems-4.8-gdb-common
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
%preun -n rtems-4.8-gdb-common
if [ $1 -eq 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
%if "%{gdb_version}" < "6.3"
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/mmalloc.info.gz || :
%endif
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
fi
%files -n rtems-4.8-gdb-common
%defattr(-,root,root)
%dir %{_infodir}
%ghost %{_infodir}/dir
%{_infodir}/gdb.info*
# FIXME: When had mmalloc.info been removed?
%if "%{gdb_version}" < "6.3"
%{_infodir}/mmalloc.info*
%endif
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_infodir}/annotate.info*