%define name insight
%define version 6.7.1
%define release 1%{?_dist_release}

Summary: Graphical debugger based on gdb
Summary(ja): gdb ベースのGUI デバッガ
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Group: Development/Debuggers
Url: http://sources.redhat.com/insight/
Source: ftp://sourceware.org/pub/insight/releases/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-root
Requires: itcl, tcl, tk
Conflicts: iwidgets
Vendor: Project Vine
Distribution: Vine Linux


%description
Insight is a tight graphical user interface to gdb written in Tcl/Tk. It
provides a comprehensive interface that enables users to harness most
of gdb's power. It's also probably the only up-to-date UI for
gdb version %{version}

%description -l ja
Insight は Tcl/TK で書かれた gdb の GUI です. ユーザに gdb がもつほとんどの
機能を使用可能な interface を提供します。これは 常時 update されており
この package は gdb %{version} の UI となっています。


%prep
%setup -q

%build
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
./configure \
	--prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--mandir=%{_mandir} \
	--disable-werror

%__make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install \
	SUBDIRS="libgui gdb" \
	INSTALL_X11_MODULES="gdb" \
	INSTALL_MODULES="libgui gdb" \
	INSTALL_X11_MODULES="gdb" \
	prefix=$RPM_BUILD_ROOT/%{_prefix} \
	libdir=$RPM_BUILD_ROOT/%{_libdir} \
	mandir=$RPM_BUILD_ROOT/%{_mandir}

#%find_lang %{name}
rm -rf $RPM_BUILD_ROOT%{_bindir}/gdb
rm -rf $RPM_BUILD_ROOT%{_bindir}/gdbtui
rm -rf $RPM_BUILD_ROOT%{_bindir}/gdbserver
rm -rf $RPM_BUILD_ROOT%{_bindir}/tclsh8.4
rm -rf $RPM_BUILD_ROOT%{_bindir}/wish8.4
rm -rf $RPM_BUILD_ROOT%{_includedir}
rm -rf $RPM_BUILD_ROOT%{_libdir}/itcl*
rm -rf $RPM_BUILD_ROOT%{_libdir}/itk*
rm -rf $RPM_BUILD_ROOT%{_libdir}/tk*
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.{a,la,so,sh}
rm -rf $RPM_BUILD_ROOT/usr/info
rm -rf $RPM_BUILD_ROOT%{_datadir}/itcl*
rm -rf $RPM_BUILD_ROOT%{_datadir}/itk*
rm -rf $RPM_BUILD_ROOT%{_datadir}/tk*
rm -rf $RPM_BUILD_ROOT%{_datadir}/tcl*
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_mandir}/man1
rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
rm -rf $RPM_BUILD_ROOT%{_mandir}/mann
rm -rf $RPM_BUILD_ROOT/usr/man/mann

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc COPYING COPYING.LIB README
%attr(755,root,root) %{_bindir}/insight
%{_datadir}/redhat
%{_datadir}/insight1.0
%{_datadir}/iwidgets4.0.1
%{_libdir}/insight1.0

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

* Tue Feb 26 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 6.7.1-0vl3
- rebuild with expat-2.0.1

* Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 6.7.1-0vl2
- rebuiled with tcl/tk-8.4.18

* Tue Jan 01 2008 Shu KONNO <owa@bg.wakwak.com> 6.7.1-0vl1
- new upstream release
- updated many scripts

* Tue Mar 29 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 6.1-0vl1
- new upstream release

* Mon Nov 19 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 5.0-0vl5
- make libiberty before sim

* Thu Nov 15 2001 Kazuhisa TAKEI<takei@vinelinux.org> 5.0-0vl4
- initial release
