%define gtk3_version 3.0.9
%define gconf2_version 2.32.0

Summary: GNOME interface for various networking tools
Summary(ja): さまざまなネットワークツールのGNOMEインターフェース
Name: gnome-nettool
Version: 3.0.1
Release: 1%{?_dist_release}

Source: http://ftp.gnome.org/pub/GNOME/sources/gnome-nettool/3.0/%{name}-%{version}.tar.xz

Group: Applications/System
URL: ftp://ftp.gnome.org/pub/GNOME/sources/gnome-nettool
License: GPL

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: GConf2-devel >= %{gconf2_version}
BuildRequires: libgtop2-devel
BuildRequires: desktop-file-utils
BuildRequires: perl(XML::Parser)
BuildRequires: gettext
BuildRequires: gnome-doc-utils
BuildRequires: docbook-utils

Requires(post): desktop-file-utils
Requires(post): scrollkeeper
Requires(postun): desktop-file-utils
Requires(postun): scrollkeeper

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
GNOME Nettool is a set of front-ends to various networking command-line
tools, like ping, netstat, ifconfig, whois, traceroute, finger.

%description -l ja
GNOME Nettoolは、ping、netstat、ifconfig、whois、traceroute、fingerといった
さまざまなネットワーク関連コマンドラインツールのフロントエンドのセットです。

%prep
%setup -q

%build
%configure --disable-scrollkeeper
%__make %{_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install --vendor gnome --delete-original                   \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications				\
  --remove-category Network                                             \
  --add-category GNOME                                                  \
  --add-category System                                                 \
  --add-category Utility                                                \
  $RPM_BUILD_ROOT%{_datadir}/applications/gnome-nettool.desktop

rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

%{find_lang} %{name}

%post
scrollkeeper-update -q ||:
update-desktop-database -q ||:
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi


%postun
scrollkeeper-update -q ||:
update-desktop-database -q ||:
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gnome-nettool.gschema.xml
%{_datadir}/gnome-nettool
%{_datadir}/gnome/help/gnome-nettool/
%{_datadir}/omf/gnome-nettool/
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/apps/*.svg


%changelog
* Sat Jan 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.1-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.0-1
- new upstream release

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release

* Sun Apr 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release
- add BuildRequires: docbook-utils

* Mon Nov 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.28.0-1
- new upstream release

* Sat Jul 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.2-1
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-1
- new upstream release

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- new upstream release

* Fri Aug 08 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.22.0-1
- new upstream release

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.0-0vl1
- new upstream release

* Sat Apr 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.1-0vl1
- new upstream release

* Wed Oct  5 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.1-0vl1
- new upstream relase

* Thu Dec 16 2004 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.99.3-0vl1
- Add patch.

* Wed Dec 15 2004 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.99.3-0vl1
