LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File autonetkit.spec of Package autonetkit (Project home:anubisg1:networking)

#
# spec file for package autonetkit
#
# Copyright (c) 2014 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/
#


%if %{undefined suse_version}

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

%endif

Name:           autonetkit
Version:        0.11.2
Release:        0
Summary:        Automatic configuration generation for emulated networks
License:        BSD-2-Clause
Group:          Development/Libraries/Python
Url:            http://autonetkit.org/
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-Mako >= 0.8
Requires:       python-configobj >= 4.7.1
Requires:       python-netaddr >= 0.7.10
Requires:       python-networkx >= 1.7
Requires:       python-tornado >= 3.0.1
Patch0:         %{name}-0.11.2-deps_version.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{defined suse_version}
%{py_requires}
%endif

%description
Construct your network from a topology diagram, add protocols, automatically allocate IP addresses,
and generate configuration files with templates. Deploy to emulated networks and measure the results,
with live visual feedback of design and measurement steps. 

%prep
%setup -q
%patch0 -p1

%build
%{__python} setup.py build

%install
%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix}

#fix rpmlint complains
chmod +x %{buildroot}/%{python_sitelib}/%{name}/design/ip.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/anm/base.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/plugins/ipv4.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/compilers/device/ubuntu.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/load/graphml.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/compilers/device/quagga.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/compilers/device/server_base.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/plugins/ipv6.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/ank_messaging.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/anm/network_model.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/deploy/netkit.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/ank.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/compilers/device/cisco.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/compilers/device/router_base.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/anm.py
chmod +x %{buildroot}/%{python_sitelib}/%{name}/workflow.py

%files
%defattr(-, root, root, 0755)
%{_bindir}/ank_collect_server
%{_bindir}/ank_webserver
%{_bindir}/%{name}
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}-%{version}-py%{py_ver}.egg-info

%changelog