summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Hutmacher <mailing@markhu.de>2014-09-07 07:51:32 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-07 07:51:32 +0700
commit794616b50a070b9d164ce76d8b2e30a6bfd97513 (patch)
treeae2737ca0f2c9376ddae6c0a5dc9957817f6bcb6
parentf0df45a0a51cb061a50a20cf6ac59fff444ca1ee (diff)
downloadslackbuilds-794616b50a070b9d164ce76d8b2e30a6bfd97513.tar.gz
system/dynamips: Added (Emulator for Cisco IOS).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/dynamips/README15
-rw-r--r--system/dynamips/dynamips.SlackBuild104
-rw-r--r--system/dynamips/dynamips.info10
-rw-r--r--system/dynamips/slack-desc18
4 files changed, 147 insertions, 0 deletions
diff --git a/system/dynamips/README b/system/dynamips/README
new file mode 100644
index 0000000000..596630a6c0
--- /dev/null
+++ b/system/dynamips/README
@@ -0,0 +1,15 @@
+Dynamips is a software that emulates Cisco IOS on a traditional PC.
+
+It has been created by Christophe Fillot who started his work in August 2005.
+
+The last official release of Dynamips supports Cisco 7200, 3600 series
+(3620, 3640 and 3660), 3700 series (3725, 3745), 2600 series (2610 to 2650XM, 2691)
+and 1700 series.
+Please note that you must provide your own IOS images compatible with the Cisco hardware emulated by Dynamips.
+
+GNS3 is based on Dynamips and Dynagen (a text-based front-end for Dynamips) to create a complete virtual Cisco
+network, adding many additional features and most importantly making it easy to create, change and save your network topologies.
+
+Unfortunately, Dynamips is no longer officially maintained, this is why we have chosen to make – with the precious
+help of contributors – an unofficial version of Dynamips called dynamips-community that brings many improvements.
+We encourage contributions and the code repository is accessible on GitHub.
diff --git a/system/dynamips/dynamips.SlackBuild b/system/dynamips/dynamips.SlackBuild
new file mode 100644
index 0000000000..77685c3673
--- /dev/null
+++ b/system/dynamips/dynamips.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Slackware build script for dynamips
+
+# Copyright 2014 Markus Hutmacher Germany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=dynamips
+VERSION=${VERSION:-0.2.8_RC3}
+SRCVER=$(echo $VERSION | tr _ -)
+SUFFIX=community # additional suffix in tarball-name
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER-$SUFFIX
+tar xvf $CWD/$PRGNAM-$SRCVER-$SUFFIX.tar.gz
+cd $PRGNAM-$SRCVER-$SUFFIX
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+
+sed -i 's/<\(libelf.h\)>/<libelf\/\1>/' common/dynamips.h common/rom2c.c
+sed -i 's/^\(\.PHONY: all dynamips\)/# \1/' Makefile
+
+if [ $ARCH == "x86_64" ]
+then
+ make dynamips.stable DYNAMIPS_ARCH=amd64 DYNAMIPS_LIB=lib64
+else
+ make dynamips.stable
+fi
+
+make install DESTDIR=$PKG/usr
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+chmod 644 README.community
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README README.community README.hypervisor TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/dynamips/dynamips.info b/system/dynamips/dynamips.info
new file mode 100644
index 0000000000..9f88f40c72
--- /dev/null
+++ b/system/dynamips/dynamips.info
@@ -0,0 +1,10 @@
+PRGNAM="dynamips"
+VERSION="0.2.8_RC3"
+HOMEPAGE="http://www.gns3.net/dynamips"
+DOWNLOAD="http://sourceforge.net/projects/gns-3/files/Dynamips/0.2.8-RC3-community/dynamips-0.2.8-RC3-community.tar.gz"
+MD5SUM="100d64f13eb383442a6a12a8bfa0c55c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Markus Hutmacher"
+EMAIL="mailing@markhu.de"
diff --git a/system/dynamips/slack-desc b/system/dynamips/slack-desc
new file mode 100644
index 0000000000..194464c012
--- /dev/null
+++ b/system/dynamips/slack-desc
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+dynamips: dynamips (Emulator for Cisco IOS)
+dynamips:
+dynamips:
+dynamips:dynamips: dynamips emulates Cisco's IOS. It is required by GNS3
+dynamips:
+dynamips:
+dynamips: Note that you must provide your own IOS-images compatible
+dynamips: with the Cisco hardware emulated by dynamips
+dynamips:
+dynamips: