File qnetwatch.spec of Package qnetwatch
#
# spec file for package qnetwatch
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name: qnetwatch
Version: 0.24b12
%define realversion 0.24.b12
Release: 0
License: GPL-2.0
Summary: Network traffic monitor
Url: http://www.batcom-it.net/?page_id=42
Group: Productivity/Networking/Diagnostic
Source: %{name}-%realversion.tar.bz2
%if 0%{?suse_version} >=1310
BuildRequires: make
BuildRequires: time
%endif
BuildRequires: libpcap-devel
BuildRequires: qt3-devel
BuildRequires: qt3-devel-tools
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
QNetwatch is a cross-platform network traffic monitor built around
the Qt3 GUI toolkit, displaying current status information and the
load for a given network interface.
It includes a libpcap-based IP packet sniffer for simple network
analysis, a companioning analyzer for a deeper look into each
packet and a connection monitor to track local connections.
%prep
%setup -q -n %{name}
%build
export QTDIR="%{_libdir}/qt3"
export LD_LIBRARY_PATH="$QTDIR/lib:$LD_LIBRARY_PATH"
export IBIN="%{_bindir}"
export ILANG="%{_datadir}/%{name}/lang"
export IDOC="%_defaultdocdir/%{name}"
export IIMG="%{_datadir}/%{name}/images"
gmake %{?_smp_mflags}
%install
export IBIN="%{buildroot}%{_bindir}"
export ILANG="%{buildroot}%{_datadir}/%{name}/lang"
export IDOC="%{buildroot}%_defaultdocdir/%{name}"
export IIMG="%{buildroot}%{_datadir}/%{name}/images"
gmake install
# install desktop file and icon
install -Dm644 images/Classic/logo-32x32.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
mkdir -p %{buildroot}%{_datadir}/applications
cat >> %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Categories=Application;Network;GNOME;GTK;System;X-SuSE-ServiceConfiguration;
StartupNotify=true
Exec=%{_bindir}/%{name}
Name=%{name}
GenericName=Network traffic monitor
Terminal=false
Type=Application
Icon=%{name}
EOF
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif
%clean
rm -rf %{buildroot}
%if 0%{?suse_version} > 1130
%post
%desktop_database_post
%postun
%desktop_database_postun
%endif
%files
%defattr(-,root,root,0755)
%doc doc/*
%{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog