aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2007-09-23 12:22:40 +0800
committeredwin <edwin@FreeBSD.org>2007-09-23 12:22:40 +0800
commite6c023b4bdac5db0395ea8eb94792107185ebcd6 (patch)
tree67e1cc212e2945c2da3fc3a6d6a5d1ac57e0b829 /emulators
parentf5ecfd78505ea47caad9404dd1f2cebd2bb78563 (diff)
downloadfreebsd-ports-gnome-e6c023b4bdac5db0395ea8eb94792107185ebcd6.tar.gz
freebsd-ports-gnome-e6c023b4bdac5db0395ea8eb94792107185ebcd6.tar.zst
freebsd-ports-gnome-e6c023b4bdac5db0395ea8eb94792107185ebcd6.zip
[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>
Diffstat (limited to 'emulators')
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/dynagen-devel/Makefile60
-rw-r--r--emulators/dynagen-devel/distinfo3
-rw-r--r--emulators/dynagen-devel/files/patch-dynagen11
-rw-r--r--emulators/dynagen-devel/files/patch-dynamips_lib.py15
-rw-r--r--emulators/dynagen-devel/files/patch-setup.py25
-rw-r--r--emulators/dynagen-devel/pkg-descr9
-rw-r--r--emulators/dynagen-devel/pkg-plist57
8 files changed, 181 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 24a13cb3aa4b..1744969f7175 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -26,6 +26,7 @@
SUBDIR += doscmd
SUBDIR += dtcyber
SUBDIR += dynagen
+ SUBDIR += dynagen-devel
SUBDIR += dynamips
SUBDIR += dynamips-devel
SUBDIR += e-uae
diff --git a/emulators/dynagen-devel/Makefile b/emulators/dynagen-devel/Makefile
new file mode 100644
index 000000000000..1615b008179c
--- /dev/null
+++ b/emulators/dynagen-devel/Makefile
@@ -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>
diff --git a/emulators/dynagen-devel/distinfo b/emulators/dynagen-devel/distinfo
new file mode 100644
index 000000000000..b6beacf7b514
--- /dev/null
+++ b/emulators/dynagen-devel/distinfo
@@ -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
diff --git a/emulators/dynagen-devel/files/patch-dynagen b/emulators/dynagen-devel/files/patch-dynagen
new file mode 100644
index 000000000000..efa94d13df08
--- /dev/null
+++ b/emulators/dynagen-devel/files/patch-dynagen
@@ -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'
diff --git a/emulators/dynagen-devel/files/patch-dynamips_lib.py b/emulators/dynagen-devel/files/patch-dynamips_lib.py
new file mode 100644
index 000000000000..4afa348c4f81
--- /dev/null
+++ b/emulators/dynagen-devel/files/patch-dynamips_lib.py
@@ -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
diff --git a/emulators/dynagen-devel/files/patch-setup.py b/emulators/dynagen-devel/files/patch-setup.py
new file mode 100644
index 000000000000..3bffa985ea88
--- /dev/null
+++ b/emulators/dynagen-devel/files/patch-setup.py
@@ -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/."
diff --git a/emulators/dynagen-devel/pkg-descr b/emulators/dynagen-devel/pkg-descr
new file mode 100644
index 000000000000..4da72d1abb37
--- /dev/null
+++ b/emulators/dynagen-devel/pkg-descr
@@ -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/
diff --git a/emulators/dynagen-devel/pkg-plist b/emulators/dynagen-devel/pkg-plist
new file mode 100644
index 000000000000..5aa51202b6d3
--- /dev/null
+++ b/emulators/dynagen-devel/pkg-plist
@@ -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%%