Summary: A GNU source-level debugger for C, C++ and other languages.
Summary(ja): C, C++ その他の言語用 GNU ソースレベルデバッガ
Name: gdb
Version: 7.10
Release: 1%{?_dist_release}
License: GPL
Group: Development/Debuggers
Source: ftp://sources.redhat.com/pub/gdb/releases/gdb-%{version}.tar.xz
Buildroot: %{_tmppath}/%{name}-%{version}-root
URL: http://sources.redhat.com/gdb/
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo expat-devel
BuildRequires: python-devel
BuildRequires: zlib-devel
Requires: install-info

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
GDB, the GNU debugger, allows you to debug programs written in C, C++,
and other languages, by executing them in a controlled fashion and
printing their data.

%description -l ja
GDB (GNU デバッガ) は C, C++ その他の言語で書かれたプログラムのデバッグに
使うツールです.プログラムの実行を制御し,データを出力することができます.

%prep
%setup -q 

%build
export CFLAGS="$RPM_OPT_FLAGS"
rm -fr dejagnu tcl expect 
./configure \
	--prefix=%{_prefix} \
	--sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir} \
    --infodir=%{_infodir} \
	%{_target_platform}

make
make info
cp gdb/NEWS .

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall infodir=$RPM_BUILD_ROOT%{_infodir} prefix=$RPM_BUILD_ROOT%{_prefix}

# The above is broken, do this for now:
#mkdir -p $RPM_BUILD_ROOT/%{_infodir}
#cp `find -name "*.info*"` $RPM_BUILD_ROOT/%{_infodir}

# These are part of binutils
#rm -f $RPM_BUILD_ROOT%{_infodir}/dir
#rm -f $RPM_BUILD_ROOT%{_infodir}/dir.info* 
rm -f $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -f $RPM_BUILD_ROOT%{_infodir}/configure*
rm -f $RPM_BUILD_ROOT%{_infodir}/standard*
rm -r $RPM_BUILD_ROOT%{_libdir}/lib{bfd*,opcodes*}
rm -f $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/{bfd.mo,opcodes.mo}
rm -rf $RPM_BUILD_ROOT%{_includedir}

%clean
rm -rf $RPM_BUILD_ROOT


%post
[ -f %{_infodir}/annotate.info ]	&& /sbin/install-info %{_infodir}/annotate.info %{_infodir}/dir || :
[ -f %{_infodir}/annotate.info.gz ]	&& /sbin/install-info %{_infodir}/annotate.info.gz %{_infodir}/dir  || :
[ -f %{_infodir}/gdb.info ]		&& /sbin/install-info %{_infodir}/gdb.info %{_infodir}/dir || :
[ -f %{_infodir}/gdb.info.gz ]		&& /sbin/install-info %{_infodir}/gdb.info.gz %{_infodir}/dir  || :
[ -f %{_infodir}/stabs.info ]		&& /sbin/install-info %{_infodir}/stabs.info %{_infodir}/dir  || :
[ -f %{_infodir}/stabs.info.gz ]	&& /sbin/install-info %{_infodir}/stabs.info.gz %{_infodir}/dir  || :


%preun
if [ $1 = 0 ]; then
	[ -f %{_infodir}/annotate.info ]	&& /sbin/install-info --delete %{_infodir}/annotate.info %{_infodir}/dir  || :
	[ -f %{_infodir}/annotate.info.gz ]	&& /sbin/install-info --delete %{_infodir}/annotate.info.gz %{_infodir}/dir  || :
	[ -f %{_infodir}/gdb.info ]		&& /sbin/install-info --delete %{_infodir}/gdb.info %{_infodir}/dir  || :
	[ -f %{_infodir}/gdb.info.gz ]		&& /sbin/install-info --delete %{_infodir}/gdb.info.gz %{_infodir}/dir  || :
	[ -f %{_infodir}/gdbint.info ]          && /sbin/install-info --delete %{_infodir}/gdbint.info %{_infodir}/dir  || :
	[ -f %{_infodir}/gdbint.info.gz ]       && /sbin/install-info --delete %{_infodir}/gdbint.info.gz %{_infodir}/dir  || :
	[ -f %{_infodir}/stabs.info ]		&& /sbin/install-info --delete %{_infodir}/stabs.info %{_infodir}/dir  || :
	[ -f %{_infodir}/stabs.info.gz ]	&& /sbin/install-info --delete %{_infodir}/stabs.info.gz %{_infodir}/dir  || :
fi


%files
%defattr(-,root,root)
%doc COPYING COPYING.LIB README NEWS
%{_bindir}/*
%{_mandir}/*/*
%{_datadir}/gdb/syscalls
%{_datadir}/gdb/python/gdb
%{_datadir}/gdb/system-gdbinit/elinos.py
%{_datadir}/gdb/system-gdbinit/wrs-linux.py
%{_infodir}/annotate.info*
%{_infodir}/gdb.info*
%{_infodir}/stabs.info*
%exclude %{_infodir}/dir
%ifarch %{ix86} x86_64
%{_libdir}/libinproctrace.so
%endif
## don't include the files in include, they are part of binutils
#%{_includedir}/*
#%{_infodir}/bfd.info*
#%{_infodir}/configure.info*
#%{_infodir}/standard.info*
#%{_libdir}/*
#%{_datadir}/locale/*/LC_MESSAGES/bfd.mo
#%{_datadir}/locale/*/LC_MESSAGES/opcode.mo


%changelog
* Sun Oct 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.10-1
- new upstream release

* Mon Jul 06 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.9.1-1
- new upstream release

* Sun Feb 22 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.9-1
- new upstream release

* Sun Dec 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.8.1-1
- new upstream release

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.8-1
- new upstream release

* Sun Nov 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.6.1-1
- new upstream release

* Mon Oct 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.5-1
- new upstream release

* Tue May 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.4.1-1
- new upstream release

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.4-1
- new upstream release

* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.2-2
- add BuildRequires: python-devel, zlib-devel
- fix %%files

* Thu Apr 28 2011 Shu KONNO <owa@bg.wakwak.com> 7.2-1
- updated gdb to 7.2

* Wed Feb 17 2010 Shu KONNO <owa@bg.wakwak.com> 7.0.1-1
- updated gdb to 7.0.1
- rebuilt with new environment

* Sat Sep 13 2008 Shu KONNO <owa@bg.wakwak.com> 6.7.1-1vl5
- applied new versioning policy, spec in utf-8

* Mon Feb 25 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 6.7.1-0vl4
- rebuild with expat-2.0.1
- add BuildRequires: expat-devel

* Sun Jan 27 2008 Shu KONNO <owa@bg.wakwak.com> 6.7.1-0vl3
- dropt %%{_localedir}/*/LC_MESSAGES/*.mo conflicts with binutils

* Fri Jan 04 2008 Shu KONNO <owa@bg.wakwak.com> 6.7.1-0vl2
- dropt %%{_libdir}/lib{bfd*,iberty*,opcodes*} conflicts with binutils-devel

* Mon Dec 31 2007 Shu KONNO <owa@bg.wakwak.com> 6.7.1-0vl1
- new upstream release

* Wed Jul 12 2006 Shu KONNO <owa@bg.wakwak.com> 6.4.90-0vl1
- new upstream release

* Sat Dec 10 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.4.0-0vl1
- new upstream release

* Thu Nov 28 2002 KAZUKI SHIMURA <rito@pos.to> 5.2.1-4vl2
- Oops, spec was written in Shift-JIS. Fixed.

* Mon Nov 11 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 5.2.1-4vl1
- based on 5.2.1-4 from Rawhide and built for Vine Linux

* Fri Aug 23 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- added mainframe patch from developerworks

* Wed Aug 21 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2.1-3
- Add changelogs to the previous patch

* Wed Aug 14 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2.1-2
- Add some patches from Elena Zannoni <ezannoni@redhat.com>

* Tue Jul 23 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2.1-1
- 5.2.1

* Mon Jul 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- compile on mainframe

* Mon Jul  8 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2-3
- Rebuild

* Tue May  7 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2-2
- Rebuild

* Mon Apr 29 2002 Trond Eivind Glomsr <teg@redhat.com> 5.2-1
- 5.2

* Mon Apr 29 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.92-1
- 5.1.92. Hopefully identical to 5.2 final

* Mon Apr 22 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.91-1
- 5.1.91. 5.2 expected in a week

* Thu Mar 28 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.90CVS-5
- Update to current

* Thu Mar 28 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.90CVS-4
- Update to current

* Thu Mar 28 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.90CVS-3
- Update to current

* Wed Mar 20 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.90CVS-2
- Update to current

* Wed Mar 13 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.90CVS-1
- Update to current 5.2 branch 

* Thu Jan 24 2002 Trond Eivind Glomsr <teg@redhat.com> 5.1.1-1
- 5.1.1
- add URL

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Dec 10 2001 Trond Eivind Glomsr <teg@redhat.com> 5.1-2
- Fix some thread+fpu problems

* Mon Nov 26 2001 Trond Eivind Glomsr <teg@redhat.com> 5.1-1
- 5.1

* Mon Nov 19 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0.94-0.71
- 5.0.94. Almost there....

* Mon Nov 12 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0.93-2
- Add patch from jakub@redhat.com to improve handling of DWARF

* Mon Nov 12 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0.93-1
- 5.0.93 
- handle missing info pages in post/pre scripts

* Wed Oct 31 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0.92-1
- 5.0.92

* Fri Oct 26 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0.91rh-1
- New snapshot
- Use the 5.0.91 versioning from the snapshot

* Wed Oct 17 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0rh-17
- New snapshot

* Thu Sep 27 2001 Trond Eivind Glomsr <teg@redhat.com> 
- New snapshot

* Wed Sep 12 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0rh-16
- New snapshot 

* Mon Aug 13 2001 Trond Eivind Glomsr <teg@redhat.com> 5.0rh-15
- Don't buildrequire compat-glibc (#51690)

* Thu Aug  9 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot, from the stable branch eventually leading to gdb 5.1

* Mon Jul 30 2001 Trond Eivind Glomsr <teg@redhat.com>
- s/Copyright/License/
- Add texinfo to BuildRequires

* Mon Jun 25 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot

* Fri Jun 15 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot
- Add ncurses-devel to buildprereq
- Remove perl from buildprereq, as gdb changed the way 
  version strings are generated

* Thu Jun 14 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot

* Wed May 16 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot - this had thread fixes for curing #39070
- New way of specifying version

* Tue May  1 2001 Trond Eivind Glomsr <teg@redhat.com>
- New tarball
- Kevin's patch is now part of gdb

* Mon Apr  9 2001 Trond Eivind Glomsr <teg@redhat.com>
- Add patch from kevinb@redhat.com to fix floating point + thread 
  problem (#24310)
- remove old workarounds
- new snapshot

* Thu Apr  5 2001 Trond Eivind Glomsr <teg@redhat.com>
- New snapshot

* Sat Mar 17 2001 Bill Nottingham <notting@redhat.com>
- on ia64, there are no old headers :)

* Fri Mar 16 2001 Trond Eivind Glomsr <teg@redhat.com>
- build with old headers, new compiler

* Fri Mar 16 2001 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot

* Mon Feb 26 2001 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot which should fix some more IA64 problems (#29151)
- remove IA64 patch, it's now integrated

* Wed Feb 21 2001 Trond Eivind Glomsr <teg@redhat.com>
- add IA64 and Alpha patches from Kevin Buettner <kevinb@redhat.com>
- use perl instead of patch for fixing the version string

* Tue Feb 20 2001 Trond Eivind Glomsr <teg@redhat.com>
- don't use kgcc anymore
- mark it as our own version
- new snapshot

* Mon Jan 22 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Link with ncurses 5.x even though we're using kgcc.
  No need to drag in requirements on ncurses4 (Bug #24445)

* Fri Jan 19 2001 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot

* Wed Dec 20 2000 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot

* Mon Dec 04 2000 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot
- new alpha patch - it now compiles everywhere. Finally.

* Fri Dec 01 2000 Trond Eivind Glomsr <teg@redhat.com>
- new snapshot

* Mon Nov 20 2000 Trond Eivind Glomsr <teg@redhat.com>
- new CVS snapshot
- disable the patches
- don't use %%configure, as it confuses the autoconf script
- enable SPARC, disable Alpha


* Wed Aug 09 2000 Trond Eivind Glomsr <teg@redhat.com>
- added patch from GDB team for C++ symbol handling

* Tue Jul 25 2000 Trond Eivind Glomsr <teg@redhat.com>
- upgrade to CVS snapshot
- excludearch SPARC, build on IA61

* Wed Jul 19 2000 Trond Eivind Glomsr <teg@redhat.com>
- rebuild

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jul 02 2000 Trond Eivind Glomsr <teg@redhat.com>
- rebuild

* Thu Jun 08 2000 Trond Eivind Glomsr <teg@redhat.com>
- use %%configure, %%makeinstall, %%{_infodir}, %%{_mandir},
  and %%{_tmppath}
- the install scripts  for info are broken(they don't care about
  you specify in the installstep), work around that.
- don't build for IA64

* Mon May 22 2000 Trond Eivind Glomsr <teg@redhat.com>
- upgraded to 5.0 - dump all patches. Reapply later if needed.
- added the NEWS file to the %%doc files
- don't delete files which doesn't get installed (readline, texinfo)
- let build system handle stripping and gzipping
- don't delete libmmalloc
- apply patch from jakub@redhat.com to make it build on SPARC

* Fri Apr 28 2000 Matt Wilson <msw@redhat.com>
- rebuilt against new ncurses

* Tue Mar  7 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for sparc baud rates > 38400.

* Tue Feb  8 2000 Jakub Jelinek <jakub@redhat.com>
- fix core file handling on i386 with glibc 2.1.3 headers

* Fri Jan 14 2000 Jakub Jelinek <jakub@redhat.com>
- fix reading registers from core on sparc.
- hack around build problems on i386 with glibc 2.1.3 headers

* Thu Oct 7 1999 Jim Kingdon
- List files to install in /usr/info specifically (so we don't pick up
things like info.info from GDB snapshots).

* Thu Oct 7 1999 Jim Kingdon
- Update GDB to 19991004 snapshot.  This eliminates the need for the
sigtramp, sparc, xref, and threads patches.  Update sparcmin patch.

* Mon Aug 23 1999 Jim Kingdon
- Omit readline manpage.

* Sat Aug 7 1999 Jim Kingdon
- Remove H.J. Lu's patches (they had been commented out).
- Add sigtramp patch (from gdb.cygnus.com) and threads patch (adapted
from code fusion CD-ROM).

* Wed Apr 14 1999 Jeff Johnson <jbj@redhat.com>
- merge H.J. Lu's patches into 4.18.

* Mon Apr 05 1999 Cristian Gafton <gafton@redhat.com>
- updated the kern22 patch with stuff from davem

* Thu Apr  1 1999 Jeff Johnson <jbj@redhat.com>
- sparc with 2.2 kernels no longer uses sunos ptrace (davem)

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 3)

* Mon Mar  8 1999 Jeff Johnson <jbj@redhat.com>
- Sparc fiddles for Red Hat 6.0.