File ns2.spec of Package ns2
#
# spec file for package ns2
#
# Copyright (c) 2012 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: ns2
Version: 2.35
Release: 0
Summary: NS-2
License: GPLv2+Exception, BSD, Others
Group: Development/Libraries/C and C++
Url: http://www.isi.edu/nsnam/ns/
Source0: http://downloads.sourceforge.net/project/nsnam/ns-2/%{version}/ns-src-%{version}.tar.gz
Patch0: ns2-tcl_detection.patch
Patch1: ns2-install.patch
Patch2: ns2-overflow.patch
Patch3: ns2-cflags.patch
Patch4: ns2-2.35-no_x.patch
Patch5: ns2-2.35-gcc47.patch
BuildRequires: gcc-c++
BuildRequires: libotcl-devel
BuildRequires: libpcap-devel
BuildRequires: libtclcl-devel
BuildRequires: tcl-devel
BuildRequires: tclcl
BuildRequires: tk-devel
%description
NS-2.
%prep
%setup -q -n ns-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%build
CFLAGS='%{optflags} -fno-strict-aliasing'
%configure
make %{?_smp_mflags}
%install
%make_install
install -D -m 0755 nse %{buildroot}%{_bindir}/nse
install -D -m 0755 nstk %{buildroot}%{_bindir}/nstk
# There are wrong checks. And a problem with TCL and x86-64 makes things worse.
#%%check
#make test
%files
%defattr(0644,root,root,0755)
%doc CHANGES.html COPYRIGHTS HOWTO-CONTRIBUTE LICENSES TODO.html
%attr(0755,-,-) %{_bindir}/ns
%attr(0755,-,-) %{_bindir}/nse
%attr(0755,-,-) %{_bindir}/nstk
%{_mandir}/man1/ns.1%{ext_man}
%changelog