[NEW PORT] emulators/dynagen-devel: Text-based front end for Dynamips development version

Dynagen is a front-end for use with the Dynamips Cisco router
	emulator. It uses an INI-like configuration file to provision
	Dynamips emulator networks. It takes care of specifying the right
	port adapters, generating and matching up those pesky NIO descriptors,
	specifying bridges, frame-relay, ATM switches, etc. It also provides
	a management CLI for listing devices, suspending and reloading
	instances, etc.

	WWW: http://dyna-gen.sourceforge.net/

PR:		ports/116343
Submitted by:	Pavel I Volkov <pol@opk.ru>
This commit is contained in:
Edwin Groothuis 2007-09-23 04:22:40 +00:00
parent ad2975b00a
commit 1e2b51f634
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=199926
8 changed files with 181 additions and 0 deletions

View file

@ -26,6 +26,7 @@
SUBDIR += doscmd
SUBDIR += dtcyber
SUBDIR += dynagen
SUBDIR += dynagen-devel
SUBDIR += dynamips
SUBDIR += dynamips-devel
SUBDIR += e-uae

View file

@ -0,0 +1,60 @@
# New ports collection makefile for: dynagen
# Date created: 2007-09-14
# Whom: Pavel Volkov <pol@opk.ru>
#
# $FreeBSD$
#
PORTNAME= dynagen
PORTVERSION= 0.10.1
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dyna-gen
PKGNAMESUFFIX= -devel
MAINTAINER= pol@opk.ru
COMMENT= Text-based front end for Dynamips development version
RUN_DEPENDS= dynamips-devel:${PORTSDIR}/emulators/dynamips-devel
CONFLICTS= dynagen-[0-9]* dynamips-[0-9]*
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGVERSION= 0.4.4
ALL_TARGET= # empty
USE_GCC= 3.4+
USE_DOS2UNIX= yes
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/dynagen ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/dynagen.ini ${PREFIX}/etc/dynagen.ini.sample
@if [ ! -f ${PREFIX}/etc/dynagen.ini ]; then \
${CP} -p ${PREFIX}/etc/dynagen.ini.sample ${PREFIX}/etc/dynagen.ini ; \
fi
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/configspec ${DATADIR}/configspec
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/tutorial.htm ${DOCSDIR}
${MKDIR} ${DOCSDIR}/tutorial_files
${INSTALL_DATA} ${WRKSRC}/docs/tutorial_files/* ${DOCSDIR}/tutorial_files
.endif
${MKDIR} ${EXAMPLESDIR}
${MKDIR} ${EXAMPLESDIR}/sample_labs
${MKDIR} ${EXAMPLESDIR}/sample_labs/simple1
${INSTALL_DATA} ${WRKSRC}/sample_labs/simple1/simple1.net ${EXAMPLESDIR}/sample_labs/simple1
${MKDIR} ${EXAMPLESDIR}/sample_labs/multiserver
${INSTALL_DATA} ${WRKSRC}/sample_labs/multiserver/multiserver.net ${EXAMPLESDIR}/sample_labs/multiserver
${MKDIR} ${EXAMPLESDIR}/sample_labs/frame_relay
${INSTALL_DATA} ${WRKSRC}/sample_labs/frame_relay/frame_relay1.net ${EXAMPLESDIR}/sample_labs/frame_relay
${MKDIR} ${EXAMPLESDIR}/sample_labs/simple2
${INSTALL_DATA} ${WRKSRC}/sample_labs/simple2/simple2.net ${EXAMPLESDIR}/sample_labs/simple2
${MKDIR} ${EXAMPLESDIR}/sample_labs/ethernet_switch
${INSTALL_DATA} ${WRKSRC}/sample_labs/ethernet_switch/ethsw1.net ${EXAMPLESDIR}/sample_labs/ethernet_switch
${INSTALL_DATA} ${WRKSRC}/sample_labs/all_config_options.txt ${EXAMPLESDIR}/sample_labs
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
MD5 (dynagen-0.10.1.tar.gz) = 4ca26e4b4b8bee61a77f92eace8404d0
SHA256 (dynagen-0.10.1.tar.gz) = c1f97b529b57020980ac5e16d9f8b88b20df1284214c3891ed1c6af5c55d86a6
SIZE (dynagen-0.10.1.tar.gz) = 614999

View file

@ -0,0 +1,11 @@
--- dynagen.orig Sun Feb 18 17:28:09 2007
+++ dynagen Mon Feb 26 16:50:51 2007
@@ -34,7 +34,7 @@
# Constants
VERSION = '0.10.1.090807'
-CONFIGSPECPATH = [ "/usr/share/dynagen", "/usr/local/share" ]
+CONFIGSPECPATH = [ "/usr/local/share/dynagen", "/usr/share/dynagen", "/usr/local/share" ]
CONFIGSPEC = 'configspec'
INIPATH = [ "/etc", "/usr/local/etc" ]
INIFILE = 'dynagen.ini'

View file

@ -0,0 +1,15 @@
--- dynamips_lib.py.orig Thu Sep 13 20:41:38 2007
+++ dynamips_lib.py Thu Sep 13 20:43:22 2007
@@ -1681,7 +1681,11 @@
flag = '1'
else:
flag = '0'
- send(self.__d, 'vm set_sparse_mem %s %s' % (self.__name, flag))
+
+ # Workaround for "*** Error: Unknown command 'set_sparse_mem'" message
+ # with dynamips-0.2.5.
+ if flag == 1:
+ send(self.__d, 'vm set_sparse_mem %s %s' % (self.__name, flag))
def __getsparsemem(self):
""" Returns the sparsemem

View file

@ -0,0 +1,25 @@
--- /dev/null Sat Nov 25 10:03:22 2006
+++ setup.py Wed Oct 11 02:08:24 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+"""Setup script for the dynagen module distribution."""
+# run this like python setup --root=/usr/local
+
+from distutils.core import setup, Extension
+
+setup( # Distribution meta-data
+ name = "dynagen",
+ version = "0.4.4",
+ description = "A frontend for dynamips",
+ author = "Greg Anuzelli",
+ author_email = "dynagen@gmail.com",
+ url = "http://sourceforge.net/projects/dyna-gen",
+
+ #py_modules = [ 'console', 'dynamips_lib']
+ py_modules = [ 'configobj', 'console', 'dynamips_lib',
+ 'validate']
+)
+
+print "If you have installed the modules, copy dynagen to some "
+print "place in your $PATH, like /usr/local/bin/."

View file

@ -0,0 +1,9 @@
Dynagen is a front-end for use with the Dynamips Cisco router
emulator. It uses an INI-like configuration file to provision
Dynamips emulator networks. It takes care of specifying the right
port adapters, generating and matching up those pesky NIO descriptors,
specifying bridges, frame-relay, ATM switches, etc. It also provides
a management CLI for listing devices, suspending and reloading
instances, etc.
WWW: http://dyna-gen.sourceforge.net/

View file

@ -0,0 +1,57 @@
bin/dynagen
@unexec if cmp -s %D/etc/dynagen.ini.sample %D/etc/dynagen.ini; then rm -f %D/etc/dynagen.ini; fi
etc/dynagen.ini.sample
@exec if [ ! -f %D/etc/dynagen.ini ] ; then cp -p %D/%F %B/dynagen.ini; fi
lib/%%PYTHON_VERSION%%/site-packages/configobj.py
lib/%%PYTHON_VERSION%%/site-packages/console.py
lib/%%PYTHON_VERSION%%/site-packages/dynamips_lib.py
lib/%%PYTHON_VERSION%%/site-packages/validate.py
lib/%%PYTHON_VERSION%%/site-packages/configobj.pyc
lib/%%PYTHON_VERSION%%/site-packages/console.pyc
lib/%%PYTHON_VERSION%%/site-packages/dynamips_lib.pyc
lib/%%PYTHON_VERSION%%/site-packages/validate.pyc
lib/%%PYTHON_VERSION%%/site-packages/configobj.pyo
lib/%%PYTHON_VERSION%%/site-packages/console.pyo
lib/%%PYTHON_VERSION%%/site-packages/dynamips_lib.pyo
lib/%%PYTHON_VERSION%%/site-packages/validate.pyo
%%EXAMPLESDIR%%/sample_labs/simple1/simple1.net
%%EXAMPLESDIR%%/sample_labs/multiserver/multiserver.net
%%EXAMPLESDIR%%/sample_labs/frame_relay/frame_relay1.net
%%EXAMPLESDIR%%/sample_labs/simple2/simple2.net
%%EXAMPLESDIR%%/sample_labs/ethernet_switch/ethsw1.net
%%EXAMPLESDIR%%/sample_labs/all_config_options.txt
@dirrm %%EXAMPLESDIR%%/sample_labs/simple1
@dirrm %%EXAMPLESDIR%%/sample_labs/multiserver
@dirrm %%EXAMPLESDIR%%/sample_labs/frame_relay
@dirrm %%EXAMPLESDIR%%/sample_labs/simple2
@dirrm %%EXAMPLESDIR%%/sample_labs/ethernet_switch
@dirrm %%EXAMPLESDIR%%/sample_labs
@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image001.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image002.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image003.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image004.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image005.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image006.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image007.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image008.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image009.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image010.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image011.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image012.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image013.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image014.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image015.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image016.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image017.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image018.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image019.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image020.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image021.gif
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image022.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial_files/image023.jpg
%%PORTDOCS%%%%DOCSDIR%%/tutorial.htm
%%PORTDOCS%%@dirrm %%DOCSDIR%%/tutorial_files
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%DATADIR%%/configspec
@dirrm %%DATADIR%%