File dynagen.spec of Package dynagen

#
# spec file for package dynagen
#
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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/
#


Name:           dynagen
Version:        0.11.0
Release:        0
Summary:        Cisco 7200 Router Emulator Command Line Interface
License:        GPL-2.0-or-later
Group:          System/Emulators/Other
URL:            https://sourceforge.net/projects/dyna-gen/
Source:         https://downloads.sourceforge.net/project/dyna-gen/%{name}%{20}source%{20}_%{20}Linux/%{name}%{20}%{version}/%{name}-%{version}.tar.gz
Source1:        dynagen.1
BuildRequires:  fdupes
Requires:       python2
BuildArch:      noarch

%description
Dynagen is a text-based front end for Dynamips, that uses the
Hypervisor mode for communication with Dynamips. Dynagen simplifies
building and working with virtual networks:
 * Uses a simple, easy to understand configuration file for specifying
   virtual router hardware configurations
 * Simple syntax for interconnecting routers, bridges, frame-relay and
   ATM switches. No need to deal with NetIOs
 * Can work in a client / server mode, with Dynagen running on your
   workstation communicating to Dynamips running on a back-end server.
   Dynagen can also control multiple Dynamips servers simultaneously for
   distributing large virtual networks across several machines.
 * Provides a management CLI for listing devices, starting, stopping,
   reloading, suspending, and resuming virtual routers.

%prep
%setup -q
sed -i 's/\r$//' README.txt dynagen.ini
sed -i 's/\/usr\/bin\/python/\/usr\/bin\/python2/' *.py dynagen
sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/python2/' *.py
find sample_labs/ -type f -exec chmod -x {} \;
find sample_labs/ -type f -exec sed -i 's/\r$//' {} \;
rm -f sample_labs/.DS_Store

%build

%install
install -Dpm 0755 dynagen %{buildroot}/%{_libexecdir}/%{name}/dynagen
install -pm 0755 *.py %{buildroot}/%{_libexecdir}/%{name}/
install -Dpm 0755 dynagen.ini %{buildroot}/%{_sysconfdir}/dynagen.ini
install -Dpm 0755 configspec %{buildroot}/%{_datadir}/%{name}/configspec
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/dynagen.1%{?ext_man}
install -d %{buildroot}%{_bindir}
ln -s %{_libexecdir}/%{name}/dynagen %{buildroot}%{_bindir}/dynagen
%fdupes %{buildroot}

%files
%license COPYING
%doc README.txt
%doc sample_labs/ docs/
%{_bindir}/dynagen
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/*
%{_sysconfdir}/dynagen.ini
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/configspec
%{_mandir}/man1/dynagen.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by