File KTrafficAnalyzer.spec of Package KTrafficAnalyzer4

#
# spec file for package KTrafficAnalyzer (Version 0.5.4.44)
#
# Copyright (c) 2010 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/
#

# norootforbuild

Name:           KTrafficAnalyzer
Version:        0.5.4.1
Release:        0
License:        GPLv2+
Group:          System/Monitoring
Summary:        KDE Tool for providing visual feedback of the current network traffic
Url:            http://sourceforge.net/projects/ktrafficanalyze/
Source0:        %{name}-%{version}.tar.bz2
Source1:        ktrafficanalyzer.svg
BuildRequires:  libkde4-devel libqt4-devel
BuildRequires:  oxygen-icon-theme
BuildRequires:  oxygen-icon-theme-large
Patch1:         KTrafficAnalyzer-stats.patch
Patch2:         KTrafficAnalyzer-icon.patch
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
%kde4_runtime_requires

%description
KTrafficAnalyzer is a KDE Tool designed to provide
visual feedback of the current network traffic,
similar to tools like e.g. DU Meter. It also
records usage statistics which are able to be
exported in csv format.

Author
------
   Wolfgang Koller <viras@users.sourceforge.net>

%prep
%autosetup -p1
sed -i 's/Icon=network-workgroup/Icon=ktrafficanalyzer/' ktrafficanalyzer.desktop

%build
%cmake_kde4
%make_jobs

%install
%kde4_makeinstall

# install icons
mkdir -p %{buildroot}%{_datadir}/icons/breeze/apps/32/
cp %{SOURCE1} %{buildroot}%{_datadir}/icons/breeze/apps/32/
mkdir -p %{buildroot}%{_datadir}/icons/breeze-dark/apps/32/
cp %{SOURCE1} %{buildroot}%{_datadir}/icons/breeze-dark/apps/32/
for i in 16 22 32 48 64 128 256
do
  mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
  cp %{_datadir}/icons/oxygen/${i}x${i}/places/network-workgroup.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/ktrafficanalyzer.png
done
%__ln_s "ktrafficanalyzer" "%{buildroot}%{_bindir}/%{name}"
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/kde4/ktrafficanalyzer.desktop
%kde_post_install

%files
%defattr(-,root,root)
%doc CHANGELOG GPL INSTALL TODO
%{_bindir}/%{name}
%{_bindir}/ktrafficanalyzer
%{_datadir}/applications/kde4/ktrafficanalyzer.desktop
%{_datadir}/icons/

%changelog
openSUSE Build Service is sponsored by