aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dynagen
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-01-24 07:46:59 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-01-24 07:47:03 +0000
commit178c8e2d79d61a1f2cfbe50110e70bfe2ab10b7a (patch)
tree1e47fb3a7674bdcf3925cbe588de5ae5408a3c57 /testing/dynagen
parentec34b88925091c8b60fce522f2cf672dbbef689e (diff)
downloadaports-178c8e2d79d61a1f2cfbe50110e70bfe2ab10b7a.tar.bz2
aports-178c8e2d79d61a1f2cfbe50110e70bfe2ab10b7a.tar.xz
testing/dynagen: new aport
Diffstat (limited to 'testing/dynagen')
-rw-r--r--testing/dynagen/APKBUILD43
-rw-r--r--testing/dynagen/etc-path.patch26
2 files changed, 69 insertions, 0 deletions
diff --git a/testing/dynagen/APKBUILD b/testing/dynagen/APKBUILD
new file mode 100644
index 0000000000..a5a2e07348
--- /dev/null
+++ b/testing/dynagen/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=dynagen
+pkgver=0.11.0
+pkgrel=0
+pkgdesc="Dynagen is a front-end for use with the Dynamips Cisco router emulator"
+url="http://www.dynagen.org/"
+arch="noarch"
+license="GPL2"
+depends="dynamips python2"
+source="http://downloads.sourceforge.net/dyna-gen/${pkgname}-${pkgver}.tar.gz
+ etc-path.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ sed -i 's/\/usr\/bin\/python/\/usr\/bin\/python2/' *.py dynagen
+ sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/python2/' *.py
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/share/dynagen
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/etc/dynagen
+
+ cp -a "$builddir"/* "$pkgdir"/usr/share/dynagen
+
+ cd "$pkgdir"/usr/bin
+ ln -s ../share/dynagen/dynagen
+
+ mv "$pkgdir"/usr/share/dynagen/dynagen.ini "$pkgdir"/etc/dynagen
+ chmod 644 "$pkgdir"/usr/share/dynagen/*
+ chmod 755 "$pkgdir"/usr/share/dynagen/dynagen
+ chmod 755 "$pkgdir"/usr/share/dynagen/pemu-start.sh
+}
+
+md5sums="3f88b3449b17096dca84d007f0b91b3f dynagen-0.11.0.tar.gz
+0fa338fedfbe37d95c29ad07c93fa094 etc-path.patch"
+sha256sums="53523fe13e151c0476596315aa724d50c6523ab72bb64d0ffc8d3ea8ad4e9628 dynagen-0.11.0.tar.gz
+4d2c1f07fb32241f29823e009b6e71b6b3421d5d690b0cb3236a8545116e87c6 etc-path.patch"
+sha512sums="41ad7f31a1c4e30f6859ab706f71c86d15e174af4cc59a1f9604f71b0f12cb28fd3487fd13bc56f98940a323dfdbe85eaabd3831fe778fc9f1a96196257df60d dynagen-0.11.0.tar.gz
+a18c1970b573006d4e2995262aeac09e5f1904474e5f034ed1275f270e98c0eb42a39ff5764e48caf406212e03ea5f67bef699f7fbbeafc829ae2d8837ff9ea5 etc-path.patch"
diff --git a/testing/dynagen/etc-path.patch b/testing/dynagen/etc-path.patch
new file mode 100644
index 0000000000..e7b299c3e4
--- /dev/null
+++ b/testing/dynagen/etc-path.patch
@@ -0,0 +1,26 @@
+diff --git a/dynagen b/dynagen
+index 81ebdec..5980bcc 100755
+--- a/dynagen
++++ b/dynagen
+@@ -43,7 +43,7 @@ from optparse import OptionParser
+ VERSION = '0.11.0'
+ CONFIGSPECPATH = ['/usr/share/dynagen', '/usr/local/share']
+ CONFIGSPEC = 'configspec'
+-INIPATH = ['/etc', '/usr/local/etc']
++INIPATH = ['/etc/dynagen', '/etc']
+ INIFILE = 'dynagen.ini'
+ MODELTUPLE = ( # A tuple of known model objects
+ C1700,
+diff --git a/dynagen.ini b/dynagen.ini
+index 885090b..7bec1ed 100644
+--- a/dynagen.ini
++++ b/dynagen.ini
+@@ -3,7 +3,7 @@
+ # Specify the file that stores the idle-pc database
+ # Defaults to the user's home directory
+ # Usage:
+-# idledb = /usr/local/etc/dynagenidledb.ini
++# idledb = /etc/dynagen/dynagenidledb.ini
+
+ # -----------------------------------------------------------------------------
+ # udp option