File gnome-nettool.spec of Package gnome-nettool

#
# spec file for package gnome-nettool
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           gnome-nettool
Version:        3.0.0
Release:        1
License:        GPLv2+
Summary:        GNOME Interface for Various Networking Tools
Url:            http://www.gnome.org
Group:          System/GUI/GNOME
Source:         ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/2.16/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM 0001-ping-Handle-output-with-icmp_req.patch bnc#679874 bg0#634749 malcolmlewis@opensuse.org -- Handle output with icmp_req
Patch0:         0001-ping-Handle-output-with-icmp_req.patch
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libgtop-2.0)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

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

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1

%build
%configure\
        --libexecdir=%{_prefix}/lib/%{name}\
        --disable-scrollkeeper
make %{?jobs:-j%jobs} V=1

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
# Utility is okay upstream, but it makes our build really unhappy and is actually not needed at all. So we remove it and just keep System.
grep -q 'System;Utility' %{buildroot}%{_datadir}/applications/gnome-nettool.desktop
# Note: I guess X-SuSE-Core-System is not the best thing for the non-GNOME menu, but we need something for the build to work. Oh well...
%suse_update_desktop_file -r -G "Network Information" gnome-nettool GNOME GTK System X-SuSE-Core-System
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%{_bindir}/gnome-nettool
%{_datadir}/applications/gnome-nettool.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gnome-nettool.gschema.xml
%{_datadir}/gnome-nettool/
%{_datadir}/icons/hicolor/*/apps/gnome-nettool.png
%{_datadir}/icons/hicolor/scalable/apps/gnome-nettool.svg

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by