File mgen.spec of Package mgen
#
# spec file for package mgen
#
# Copyright (c) 2015, Martin Hauke <mardnh@gmx.de>
#
# 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: mgen
Version: 5.02c
Release: 0
Summary: Packet generator for IP network performance tests
License: NRL
Group: Productivity/Networking/Diagnostic
Url: http://www.nrl.navy.mil/itd/ncs/products/mgen
Source: http://downloads.pf.itd.nrl.navy.mil/mgen/src-%{name}-%{version}.tgz
Source1: mgen.1
Patch0: mgen-respect-cflags.diff
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
BuildRequires: libxml2-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MGEN provides the ability to perform IP network performance tests
and measurements using TCP and UDP/IP traffic. Test messages
can be generated, received and logged. MGEN offers control over
all network parameters and timing of these messages. All this can be
done either via the command line or defined in a file format for
greater reproducibility.
%prep
%setup -q -n src-%{name}-%{version}
%patch0 -p1
%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags} -C makefiles -f Makefile.linux
%install
install -Dpm 0755 makefiles/mgen %{buildroot}/%{_bindir}/mgen
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/mgen.1
%files
%defattr(-,root,root)
%doc LICENSE.TXT README.TXT VERSION.TXT
%{_bindir}/mgen
%{_mandir}/man1/*
%changelog