File argus-client.spec of Package argus-client

#
# spec file for package argus-client
#
# Copyright (c) 2014 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:           argus-client
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  libpcap
BuildRequires:  ncurses-devel
BuildRequires:  tcpd-devel
BuildRequires:  tcsh
%define name2 argus-clients
Summary:        Client for Network Monitoring Tool
License:        GPL-2.0+
Group:          Productivity/Networking/Diagnostic
Version:        3.0.8
Release:        0
Url:            http://www.qosient.com/argus/

Source:         http://qosient.com/argus/src/%{name2}-%{version}.tar.gz
Patch1:         %{name2}-3.0.6-overflow.patch
Patch2:         %{name2}-3.0.8-fclose.patch
# PATCH-FIX-UPSTREAM fix mem leak (bnc#537485)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       argus
Provides:       argus:/usr/sbin/argus

%description
Client for Argus network monitoring tool.

%prep
%setup -n %{name2}-%{version}
%patch1
%patch2

%build
#autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -Wall"
%configure
make %{?_smp_mflags}

%install
install -d -m 755 $RPM_BUILD_ROOT/{etc,usr/{bin,share/man}}
install -m 700 bin/arg* $RPM_BUILD_ROOT/usr/bin/
rm -f $RPM_BUILD_ROOT/usr/bin/argus_linux
install -m 755 bin/ra* $RPM_BUILD_ROOT/usr/bin/
( cd man
  cp -a man* $RPM_BUILD_ROOT%{_mandir} 
  chmod a-x $RPM_BUILD_ROOT%{_mandir}/*/* )
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/tcpdump.1*
install -m 600 support/Config/rarc $RPM_BUILD_ROOT/etc/ra.conf
find support -type f -exec chmod 0644 {} \;
rm -f $RPM_BUILD_ROOT/usr/bin/argus*

%files
%defattr(-,root,root)
%doc COPYING MANIFEST support
%{_mandir}/man*/*
%config /etc/ra.conf
/usr/bin/ra*

%changelog