File gns3-server.spec of Package gns3-server

# spec file for package gns3-server
# Copyright (c) 2015 SUSE LINUX 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

%if %{undefined suse_version}

# get python versions
%global py3_ver %(if [ -f "%{__python3}" ]; then %{__python3} -c "import sys; sys.stdout.write(sys.version[:3])"; else echo 0; fi;)


Name:           gns3-server
Summary:        GNS3 is a graphical network simulator
License:        GPL-3.0+
Group:          Productivity/Networking/Other
Version:        1.3.1
Release:        0
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  python3-devel >= 3.3
BuildRequires:  python3-netifaces
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
Requires:       cpulimit
Requires:       dynamips >= 0.2.11
Requires:       iouyap
Requires:       python3-Jinja2 >= 2.7.3
Requires:       python3-aiohttp
Requires:       python3-jsonschema >= 2.3.0
Requires:       python3-netifaces
Requires:       python3-raven
Requires:       qemu
Requires:       vpcs >= 0.5b1
Requires:       wireshark
%if 0%{?suse_version}
Recommends:     virtualbox
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM.
Clients like the GNS3 GUI controls the server using a JSON-RPC API over Websockets.

You will need the new GNS3 GUI (gns3-gui repository) to control the server.

%setup -q

python3 build

python3 install --root=%{buildroot} --prefix=%{_prefix}
chmod +x %{buildroot}/%{python3_sitelib}/gns3server/
chmod +x %{buildroot}/%{python3_sitelib}/gns3server/modules/iou/
rm -rf %{buildroot}/%{python3_sitelib}/tests

%defattr(-, root, root, 0755)

openSUSE Build Service is sponsored by