Maros Zatko c83b20e
%define target arm-none-eabi
Maros Zatko c83b20e
%define gdb_datarootdir %{_datarootdir}/gdb-%{target}-%{version}
Maros Zatko c83b20e
Maros Zatko c83b20e
Name:		%{target}-gdb
Maros Zatko c83b20e
Version:	7.6.2
dc9abf1
Release:	2%{?dist}
Maros Zatko c83b20e
Summary:	GDB for (remote) debugging ARM targets
Maros Zatko c83b20e
Group:		Development/Debuggers
Maros Zatko c83b20e
License:	GPLv3+
Maros Zatko c83b20e
URL:		http://sources.redhat.com/gdb/
Maros Zatko c83b20e
Source0:	http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.bz2
Maros Zatko c83b20e
Maros Zatko c83b20e
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Maros Zatko c83b20e
BuildRequires:	texinfo
Maros Zatko c83b20e
BuildRequires:	ncurses-devel
Maros Zatko c83b20e
BuildRequires:	python-devel
Maros Zatko c83b20e
BuildRequires:	texinfo-tex
Maros Zatko c83b20e
BuildRequires:	expat-devel
Maros Zatko c83b20e
Maros Zatko c83b20e
%description
Maros Zatko c83b20e
This is a version of GDB, the GNU Project debugger, for (remote)
Maros Zatko c83b20e
debugging %{target} binaries. GDB allows you to see and modify what is
Maros Zatko c83b20e
going on inside another program while it is executing.
Maros Zatko c83b20e
Maros Zatko c83b20e
%package devel
Maros Zatko c83b20e
Summary: GDB for (remote) debugging ARM targets
Maros Zatko c83b20e
Group: Development/Debuggers
Maros Zatko c83b20e
Requires: %{name} = %{version}-%{release}
Maros Zatko c83b20e
Maros Zatko c83b20e
%description devel
Maros Zatko c83b20e
This is a version of GDB, the GNU Project debugger, for (remote)
Maros Zatko c83b20e
debugging %{target} binaries.  GDB allows you to see and modify what is
Maros Zatko c83b20e
going on inside another program while it is executing.  This package
Maros Zatko c83b20e
contains development headers for working with gdb.
Maros Zatko c83b20e
Maros Zatko c83b20e
%prep
Maros Zatko c83b20e
%setup -q -c -n %{name}
Maros Zatko c83b20e
cd gdb-%{version}
Maros Zatko c83b20e
Maros Zatko c83b20e
%build
Maros Zatko c83b20e
mkdir -p build
Maros Zatko c83b20e
cd build
Maros Zatko c83b20e
# Set datarootdir to have target and version in so that we can exist
Maros Zatko c83b20e
# side-by-side with other gdb installations of different versions
Maros Zatko c83b20e
CFLAGS="$RPM_OPT_FLAGS" ../gdb-%{version}/configure --prefix=%{_prefix} \
Maros Zatko c83b20e
	--libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \
Maros Zatko c83b20e
	--datarootdir=%{gdb_datarootdir} --disable-rpath \
Maros Zatko c83b20e
	--target=%{target} --disable-nls --disable-werror --with-python --without-doc --with-xml --with-expat
Maros Zatko c83b20e
make %{?_smp_mflags}
Maros Zatko c83b20e
Maros Zatko c83b20e
%install
Maros Zatko c83b20e
rm -rf $RPM_BUILD_ROOT
Maros Zatko c83b20e
cd build
Maros Zatko c83b20e
make install DESTDIR=$RPM_BUILD_ROOT
Maros Zatko c83b20e
Maros Zatko c83b20e
# we don't want these as this is a cross-compiler
Maros Zatko c83b20e
rm -rf $RPM_BUILD_ROOT%{_infodir}
Maros Zatko c83b20e
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
Maros Zatko c83b20e
Maros Zatko c83b20e
# Get rid of the shared lib
Maros Zatko c83b20e
rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{target}-sim.a
Maros Zatko c83b20e
Maros Zatko c83b20e
# Non-linux targets don't have syscalls
Maros Zatko c83b20e
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/gdb/syscalls
Maros Zatko c83b20e
Maros Zatko c83b20e
%clean
Maros Zatko c83b20e
rm -rf $RPM_BUILD_ROOT
Maros Zatko c83b20e
Maros Zatko c83b20e
%files
Maros Zatko c83b20e
%defattr(-,root,root,-)
Maros Zatko c83b20e
%doc gdb-%{version}/{COPYING?,COPYING?.LIB}
Maros Zatko c83b20e
Maros Zatko c83b20e
%{_bindir}/%{target}-*
Maros Zatko c83b20e
%{_mandir}/man1/%{target}-*.1.gz
Maros Zatko c83b20e
%dir %{_datarootdir}/gdb-%{target}-%{version}
Maros Zatko c83b20e
%{_datarootdir}/gdb-%{target}-%{version}/*
Maros Zatko c83b20e
Maros Zatko c83b20e
%files devel
Maros Zatko c83b20e
%defattr(-,root,root,-)
Maros Zatko c83b20e
%{_includedir}/gdb/jit-reader.h
Maros Zatko c83b20e
Maros Zatko c83b20e
%changelog
dc9abf1
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.6.2-2
dc9abf1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
dc9abf1
Maros Zatko c83b20e
* Tue Jun 17 2014 Jérôme Glisse <jglisse@redhat.com> 7.6.2-1
Maros Zatko c83b20e
- Drop texinfo patch, update to 7.6.2, fix rpath and other rpmlint warnings and errors.
Maros Zatko c83b20e
Maros Zatko c83b20e
* Fri Feb 7 2014 Maroš Zaťko <mzatko@fedoraproject.org> 7.4.1-2
Maros Zatko c83b20e
- Add patch to fix texinfo build error
Maros Zatko c83b20e
Maros Zatko c83b20e
* Sun Oct 06 2013 David Lanzendörfer <david.lanzendoerfer@o2s.ch> 7.4.1-1
Maros Zatko c83b20e
- Initial release