File D-ITG.spec of Package D-ITG

#
# spec file for package D-ITG
#
# 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:           D-ITG
Version:        2.8~RC1
Release:        0
License:        GPLv3+
Summary:        Distributed Internet Traffic Generator
Url:            http://www.grid.unina.it/software/ITG/
Group:          Productivity/Networking/Diagnostic
Source0:        http://www.grid.unina.it/software/ITG/codice/D-ITG-2.8.0-rc1.tgz
# PATCH-FIX-UPSTREAM %{name}-2.7.0_Beta2-aliasing.patch emailed_upstream reddwarf@opensuse.org -- fix aliasing problems. Doesn't apply anymore with the latest version, but upstream ignored the patch and I don't feel as to fix it now.
Patch0:         %{name}-2.7.0_Beta2-aliasing.patch
# PATCH-FIX-UPSTREAM %{name}-2.7.0_Beta2-parallel_make.patch emailed_upstream reddwarf@opensuse.org -- allow to parallel compile
Patch1:         %{name}-2.7.0_Beta2-parallel_make.patch
# PATCH-FIX-UPSTREAM %{name}-2.7.0_Beta2-gethostbyname.patch emailed_upstream reddwarf@opensuse.org -- remove use of gethostbyname()
Patch2:         %{name}-2.7.0_Beta2-gethostbyname.patch
# PATCH-FIX-UPSTREAM %{name}-2.7.0_Beta2-cflags.patch emailed_upstream reddwarf@opensuse.org -- don't substitute -O2 and don't use -fPIC when isn't needed
Patch3:         %{name}-2.8.0_RC1-cflags.patch
# PATCH-FIX-UPSTREAM %{name}-2.7.0_Beta2-cflags.patch reddwarf@opensuse.org -- Add missing include. I didn't report, what the point with this upstream?
Patch4:         %{name}-2.8.0_RC1-includes.patch
BuildRequires:  gcc-c++
BuildRequires:  lksctp-tools-devel

%description
D-ITG (Distributed Internet Traffic Generator) is a platform capable to produce
traffic at packet level accurately replicating appropriate stochastic processes
for both IDT (Inter Departure Time) and PS (Packet Size) random variables
(exponential, uniform, cauchy, normal, pareto, ...). D-ITG supports both IPv4
and IPv6 traffic generation and it is capable to generate traffic at network,
transport, and application layer.

%package octave
Summary:        ITGplot
Group:          Productivity/Networking/Diagnostic
Requires:       %{name} = %{version}

%description octave
ITGplot is an Octave script that enables to draw plots starting from the data
contained in delay.dat, bitrate.dat, jitter.dat or packet-loss.dat.

%prep
%setup -q -n D-ITG-2.8.0-rc1
#%%patch0
%patch1
%patch2
%patch3
%patch4

%build
make CXXOPT='%{optflags} -fno-strict-aliasing' -C src %{?_smp_mflags} sctp=on dccp=on all

%install
install -p -D -m 0755 bin/ITGSend '%{buildroot}%{_bindir}/ITGSend'
install -p -D -m 0755 bin/ITGRecv '%{buildroot}%{_bindir}/ITGRecv'
install -p -D -m 0755 bin/ITGLog '%{buildroot}%{_bindir}/ITGLog'
install -p -D -m 0755 bin/ITGDec '%{buildroot}%{_bindir}/ITGDec'
install -p -D -m 0755 bin/ITGManager '%{buildroot}%{_bindir}/ITGManager'
install -p -D -m 0755 src/ITGPlot/ITGplot '%{buildroot}%{_bindir}/ITGplot'

%files
%defattr(0644, root, root, 0755)
%doc CHANGELOG LICENSE README
%attr(0755, root, root) %{_bindir}/ITGSend
%attr(0755, root, root) %{_bindir}/ITGRecv
%attr(0755, root, root) %{_bindir}/ITGLog
%attr(0755, root, root) %{_bindir}/ITGDec
%attr(0755, root, root) %{_bindir}/ITGManager

%files octave
%defattr(0755, root, root, 0755)
%{_bindir}/ITGplot

%changelog
openSUSE Build Service is sponsored by