Summary: KDbg - a graphical user interface to gdb
Summary(ja): GDB のグラフィカルユーザインターフェイス
Name: kdbg
Version: 2.5.4
Release: 1%{?_dist_release}

License: GPL+
Group: Applications/Development
URL: http://www.kdbg.org/

Source: http://download.sourceforge.net/kdbg/%{name}-%{version}.tar.gz
Patch0: kdbg-2.5.1-icons.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: kdelibs4-devel
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
Requires: gdb
Requires: xterm

%description
KDbg is a K Desktop Environment (KDE) GUI for gdb, the GNU debugger.
KDbg provides the programmer with an intuitive interface for setting
breakpoints, inspecting variables, and stepping through code. KDbg
requires X and KDE to be installed in order to run.

%prep
%setup -q
%patch0 -p1 -b .icons

%build
# don't install icons, which are included in oxygen-icon-theme
rm -f kdbg/pics/*action-debug-run*

mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
    -DCMAKE_BUILD_TYPE=release \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DKDE_DISTRIBUTION_TEXT="%{version}-%{release} Vine Linux" \
    ..
popd

make %{?_smp_mflags} -C %{_target_platform}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install/fast -C %{_target_platform}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
touch --no-create %{_datadir}/icons/oxygen  &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
  update-desktop-database -q &> /dev/null
  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
  touch --no-create %{_datadir}/icons/oxygen  &> /dev/null || :
  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
  gtk-update-icon-cache %{_datadir}/icons/oxygen  &> /dev/null || :
fi

%posttrans
update-desktop-database -q &> /dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/oxygen  &> /dev/null || :


%files
%defattr(-,root,root)
%doc BUGS ChangeLog* COPYING README TODO ReleaseNotes-*
%{_bindir}/kdbg
%{_datadir}/applications/kde4/*
%{_datadir}/kde4/apps/%{name}
%{_datadir}/icons/*/*/*/*
%{_datadir}/locale/*
%config (noreplace) %{_datadir}/config/kdbgrc
%doc %{_docdir}/HTML/*

%changelog
* Sat Jan 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.5.4-1
- updated to 2.5.4
- built on current VineSeed

* Fri Apr 16 2010 Shu KONNO <owa@bg.wakwak.com> 2.1.1-3
- rebuilt without smp option
- added BR: arts-devel

* Wed Mar 24 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.1.1-2
- rebuilt with new toolchain
- added %%post, %%postun and %%posttrans section
- added Patch0 from Fedora
  * Fri Feb 27 2009 Than Ngo <than@redhat.com> - 2.1.1-1
  - fix build issue against gcc-4.4

* Sun May 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.1.1-1
- applied new versioning policy, spec in UTF-8
- new upstream release

* Sun Dec 30 2007 Shu KONNO <owa@bg.wakwak.com> 2.0.4-0vl3
- changed configure to %%configure

* Fri Jun  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.4-0vl2
- rebuild for VineSeed

* Fri Jun  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.4-0vl1
- new upstream release
- update URL

* Tue Oct 18 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.0-0vl1
- new upstream release

* Sun Mar 20 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.10-0vl3
- rebuild with kde-3.4.0 (VineSeed)

* Sun Mar 20 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.10-0vl2
- rebuild with kde-3.4.0 (Vine3.1)

* Fri Oct 22 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.10-0vl1
- source upgrade

* Sat May  1 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.9-0vl2
- use License tag
- rebuild with qt-3.3.2 and kde-3.2.2

* Sun Sep 21 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.9-0vl1
- source upgrade
- change spec to build with gcc-3.2.3

* Mon Jul 21 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.8-0vl1
- source upgrade
- change spec to build with gcc295
- change make option for SMP and add script

* Sun Jun 15 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.7-0vl2
- rebuild with qt-3.1.2 and kde-3.1.2

* Tue Mar  3 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.7-0vl1
- source upgrade
- build with qt-3.1.1 and kde-3.1

* Mon Oct 14 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.6-0vl1
- source upgrade
- build with qt-3.0.5 and kde-3.0.4

* Tue Aug  6 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.5-0vl1
- first release
