%define target avr
Name: %{target}-gdb
Version: 6.6
Release: 10%{?dist}
Summary: GDB for (remote) debugging %{target} binaries
Group: Development/Tools
License: GPLv2+
URL: http://sources.redhat.com/gdb/
Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.gz
Source1: README.fedora
Patch0: binutils-2.16.1-open.patch
Patch1: gdb-6.6-open.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires: ncurses-devel chrpath
%description
This is a special version of GDB, the GNU Project debugger, for (remote)
debugging %{target} binaries. GDB allows you to see what is going on
inside another program while it executes or what another program was doing at
the moment it crashed.
%prep
%setup -q -c
pushd gdb-%{version}
%patch0 -p1 -z .open
%patch1 -p1 -z .open
# fix various configure tests failing on -Werror-implicit-function-declaration
sed -i -e 's/exit (0)/return 0/g' -e 's/ exit(2)/ return 2/g' \
`find -name configure`
popd
cp %{SOURCE1} .
%build
mkdir -p build
pushd build
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" \
../gdb-%{version}/configure --prefix=%{_prefix} \
--libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \
--target=%{target} --disable-nls
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd
# our usual libtool sed magic doesn't work as libtool gets generated during
# the make <sigh>
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/%{name}
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/%{name}tui
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{_infodir}
rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc gdb-%{version}/COPYING* gdb-%{version}/README*
%{_bindir}/%{name}*
%{_mandir}/man1/%{name}*
%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Apr 2 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-8
- Fix missing prototype compiler warnings
* Mon Feb 25 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-7
- Rebuild again as koji successfully build it but didn't tag it
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 6.6-6
- Autorebuild for GCC 4.3
* Wed Aug 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-5
- Update License tag for new Licensing Guidelines compliance
- Fix building with new glibc open checking
* Thu Jun 14 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-4
- Add BuildRequires: ncurses-devel (bz 243248)
- Use VPATh building (bz 243248)
* Mon Jun 11 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-3
- Remove bogus avr-gcc-c++ Requires (bz 243248)
* Fri Jun 8 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 6.6-2
- Various specfile cleanups
* Thu May 31 2007 Lennart Kneppers <lennartkneppers@gmail.com> 6.6-1
- Initial release