File ns3-netanim.spec of Package ns3
#
# spec file for package netanim
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define ns3_version 3.36.1
Name: ns3-netanim
Version: 3.108
Release: 0
Summary: NS-3 offline network animator
License: GPL-2.0-only
Group: Productivity/Scientific/Other
URL: https://www.nsnam.org/wiki/NetAnim
Source0: ns-allinone-%{ns3_version}.tar.bz2
BuildRequires: cmake
BuildRequires: c++_compiler
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(ns3-applications)
BuildRequires: pkgconfig(ns3-core)
BuildRequires: pkgconfig(ns3-internet)
BuildRequires: pkgconfig(ns3-network)
BuildRequires: pkgconfig(ns3-point-to-point)
BuildRequires: update-desktop-files
Provides: netanim = %{version}
Obsoletes: netanim < %{version}
%description
Offline animator based on the Qt 5 toolkit. It currently animates the simulation
using an XML trace file collected during simulation.
%prep
%setup -q -n ns-allinone-%{ns3_version}
%build
cd netanim-%{version}
qmake-qt5 QMAKE_CFLAGS+="%{optflags}" QMAKE_CXXFLAGS+="%{optflags}" NetAnim.pro
make V=1 %{?_smp_mflags}
%install
cd netanim-%{version}
install -D -m 755 -t %{buildroot}%{_bindir}/ NetAnim
install -D -T -m 644 netanim-logo.png %{buildroot}%{_datadir}/icons/hicolor/ns3_netanim.png
%if 0%{suse_version} > 1500
%suse_update_desktop_file -c ns3-netanim NetAnim NetAnim NetAnim ns3_netanim Science DataVisualization
%else
%suse_update_desktop_file -c ns3-netanim NetAnim NetAnim NetAnim ns3_netanim Science Math
%endif
%files
%{_bindir}/NetAnim
%{_datadir}/applications/*.desktop
%dir %{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/*.png
%changelog