forked from Imagelibrary/rtems
New.
This commit is contained in:
65
contrib/crossrpms/gdb/base-gdb.add
Normal file
65
contrib/crossrpms/gdb/base-gdb.add
Normal file
@@ -0,0 +1,65 @@
|
||||
%if "%{_prefix}" != "/usr"
|
||||
# ==============================================================
|
||||
# rtems-base-gdb
|
||||
# ==============================================================
|
||||
%package -n @rpmprefix@rtems@osversion@-base-gdb
|
||||
Summary: base package for rtems gdb
|
||||
Group: Development/Tools
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
%description -n @rpmprefix@rtems@osversion@-base-gdb
|
||||
|
||||
RTEMS is an open source operating system for embedded systems.
|
||||
|
||||
This is the base for gdb regardless of target CPU.
|
||||
|
||||
%post -n @rpmprefix@rtems@osversion@-base-gdb
|
||||
/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
|
||||
%if "%{gdb_version}" >= "5.0"
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz
|
||||
%endif
|
||||
%if "{gdb_version}" >= "6.0"
|
||||
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz
|
||||
%endif
|
||||
|
||||
%preun -n @rpmprefix@rtems@osversion@-base-gdb
|
||||
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
|
||||
%if "%{gdb_version}" >= "5.0"
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz
|
||||
%endif
|
||||
%if "{gdb_version}" >= "6.0"
|
||||
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz
|
||||
%endif
|
||||
fi
|
||||
|
||||
%files -n @rpmprefix@rtems@osversion@-base-gdb
|
||||
%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
|
||||
# FIXME: When had gdbint and stabs been introduced?
|
||||
%if "%{gdb_version}" >= "5.0"
|
||||
%{_infodir}/gdbint.info*
|
||||
%{_infodir}/stabs.info*
|
||||
%endif
|
||||
|
||||
%if "{gdb_version}" >= "6.0"
|
||||
%{_infodir}/annotate.info*
|
||||
%endif
|
||||
|
||||
%endif
|
||||
22
contrib/crossrpms/gdb/build.add
Normal file
22
contrib/crossrpms/gdb/build.add
Normal file
@@ -0,0 +1,22 @@
|
||||
%build
|
||||
mkdir -p build
|
||||
cd build
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
../gdb-%{gdb_version}/configure \
|
||||
--build=%_build --host=%_host \
|
||||
--target=@tool_target@ \
|
||||
--verbose --disable-nls \
|
||||
--without-included-gettext \
|
||||
--disable-win32-registry \
|
||||
--disable-werror \
|
||||
--with-sysroot=%{_prefix}/@tool_target@/sys-root \
|
||||
--prefix=%{_prefix} --bindir=%{_bindir} \
|
||||
--includedir=%{_includedir} --libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} --infodir=%{_infodir}
|
||||
|
||||
make all
|
||||
#%if "%{_prefix}" != "/usr"
|
||||
make info
|
||||
#%endif
|
||||
cd ..
|
||||
|
||||
24
contrib/crossrpms/gdb/gdb.add
Normal file
24
contrib/crossrpms/gdb/gdb.add
Normal file
@@ -0,0 +1,24 @@
|
||||
%define gdb_version @GDB_VERS@
|
||||
%define gdb_rpmvers %{expand:%(echo @GDB_VERS@ | tr - _)}
|
||||
|
||||
Name: @rpmprefix@@tool_target@-gdb
|
||||
Summary: Gdb for target @tool_target@
|
||||
Group: Development/Tools
|
||||
Version: %{gdb_rpmvers}
|
||||
Release: @GDB_RPMREL@%{?dist}
|
||||
License: GPL/LGPL
|
||||
URL: http://sources.redhat.com/gdb
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%if "%{_prefix}" != "/usr"
|
||||
# Required for building the infos
|
||||
BuildRequires: /sbin/install-info
|
||||
BuildRequires: texinfo >= 4.2
|
||||
%endif
|
||||
BuildRequires: flex
|
||||
BuildRequires: bison
|
||||
|
||||
@SOURCES@
|
||||
|
||||
%description
|
||||
Cross gdb for target @tool_target@
|
||||
40
contrib/crossrpms/gdb/install.add
Normal file
40
contrib/crossrpms/gdb/install.add
Normal file
@@ -0,0 +1,40 @@
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
cd build
|
||||
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
|
||||
|
||||
%if "%{_prefix}" != "/usr"
|
||||
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
|
||||
|
||||
%if "%{_prefix}" == "/usr"
|
||||
# Conflict with a native gdb's infos
|
||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
||||
%else
|
||||
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*
|
||||
%endif
|
||||
|
||||
# We don't ship host files
|
||||
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
|
||||
|
||||
cd ..
|
||||
|
||||
8
contrib/crossrpms/gdb/prep.add
Normal file
8
contrib/crossrpms/gdb/prep.add
Normal file
@@ -0,0 +1,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 ..
|
||||
|
||||
32
contrib/crossrpms/gdb/rpm-install.add
Normal file
32
contrib/crossrpms/gdb/rpm-install.add
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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
|
||||
;;
|
||||
%if "%{_prefix}" != "/usr"
|
||||
# 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
|
||||
;;
|
||||
%endif
|
||||
esac
|
||||
done
|
||||
|
||||
sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
|
||||
%if "%{_prefix}" != "/usr"
|
||||
-e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
|
||||
%endif
|
||||
< os_install_post~ > os_install_post
|
||||
%define __os_install_post . ./os_install_post
|
||||
|
||||
25
contrib/crossrpms/gdb/target-gdb.add
Normal file
25
contrib/crossrpms/gdb/target-gdb.add
Normal file
@@ -0,0 +1,25 @@
|
||||
# ==============================================================
|
||||
# @tool_target@-gdb
|
||||
# ==============================================================
|
||||
# %package -n @rpmprefix@@tool_target@-gdb
|
||||
# Summary: rtems gdb for @tool_target@
|
||||
# Group: Development/Tools
|
||||
# Requires: @rpmprefix@rtems@osversion@-base-gdb
|
||||
|
||||
%description -n @rpmprefix@@tool_target@-gdb
|
||||
|
||||
GNU gdb targetting @tool_target@.
|
||||
|
||||
%files -n @rpmprefix@@tool_target@-gdb
|
||||
%defattr(-,root,root)
|
||||
%if "%{_prefix}" != "/usr"
|
||||
%dir %{_mandir}
|
||||
%dir %{_mandir}/man1
|
||||
%endif
|
||||
%{_mandir}/man1/@tool_target@-*.1*
|
||||
|
||||
%if "%{_prefix}" != "/usr"
|
||||
%dir %{_bindir}
|
||||
%endif
|
||||
%{_bindir}/@tool_target@-*
|
||||
|
||||
Reference in New Issue
Block a user