summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoka2017-12-26 12:19:50 +0100
committerjoka2017-12-26 12:19:50 +0100
commit6699e334b27b0c92488f4799cd4eaef6f297d8da (patch)
tree19a3a98e542407780f7b9384f693e28fa88802ee
downloadaur-6699e334b27b0c92488f4799cd4eaef6f297d8da.tar.gz
initial version
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD48
-rw-r--r--containernet-git.install18
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0c21446da93
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = containernet-git
+ pkgdesc = "Mininet with added Docker support"
+ pkgver = 2.3.1
+ pkgrel = 1
+ url = https://github.com/containernet/containernet/
+ arch = any
+ license = custom
+ makedepends = git
+ makedepends = python2-setuptools
+ makedepends = help2man
+ depends = python2
+ depends = net-tools
+ depends = iputils
+ depends = python2-networkx
+ depends = iperf
+ depends = open-vswitch
+ depends = python-iptables
+ depends = docker
+ depends = python2-urllib3
+ depends = python2-pytest
+ optdepends = xorg-xhost
+ source = containernet-git::git+https://github.com/containernet/containernet
+ md5sums = SKIP
+
+pkgname = containernet-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bdad59b2e28
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Johannes Kampmeyer <aur@kajoh.de>
+# Contributor: Pedro Martinez-Julia <pedromj@gmail.com>
+# Contributor: Walter Dworak <preparationh67@gmail.com>
+
+pkgname=containernet-git
+pkgver=20171220
+pkgrel=1
+pkgdesc="Mininet with added Docker support"
+url="https://github.com/containernet/containernet/"
+license=('custom')
+depends=('bash' 'python2' 'python2-networkx' 'net-tools' 'iputils' 'iperf' 'openvswitch' 'docker' 'python2-pytest' 'python2-urllib3' 'python-iptables')
+optdepends=('xorg-xhost')
+makedepends=('help2man' 'python2-setuptools' 'git')
+install="${pkgname}.install"
+arch=('i686' 'x86_64')
+conflicts=('mininet')
+source=("$pkgname::git+http://github.com/containernet/containernet")
+md5sums=('SKIP')
+
+prepare () {
+ cd "$srcdir/$pkgname"
+ grep python2 Makefile && return
+ grep -rIil '#!.*python' . | xargs -n1 sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g'
+ grep -rIil '#!.*python' . | xargs -n1 sed -i 's:#!/usr/bin/python:#!/usr/bin/python2:g'
+ sed 's:BINDIR = /usr/bin:BINDIR = $(DESTDIR)/usr/bin:g' -i Makefile
+ sed 's:MANDIR = /usr/share/man/man1:MANDIR = $(DESTDIR)/usr/share/man/man1:g' -i Makefile
+ sed 's:PYMN = python -B bin/mn:PYMN = python2 -B bin/mn:g' -i Makefile
+ sed 's:install $(MNEXEC) $(BINDIR):mkdir -p $(BINDIR); install $(MNEXEC) $(BINDIR):g' -i Makefile
+ sed 's:install $(MANPAGES) $(MANDIR):mkdir -p $(MANDIR);install $(MANPAGES) $(MANDIR):g' -i Makefile
+ sed 's:python setup.py:python2 setup.py install --prefix=/usr --root="$(DESTDIR)" --optimize=1:g' -i Makefile
+}
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git log --format="%cd" --date=short -1 | sed 's/-//g'
+}
+
+build () {
+ cd "$srcdir/$pkgname"
+ python2 setup.py build
+}
+
+package () {
+ cd "$srcdir/$pkgname"
+ install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ make DESTDIR="${pkgdir}" install
+}
+
diff --git a/containernet-git.install b/containernet-git.install
new file mode 100644
index 00000000000..404cf69e3b7
--- /dev/null
+++ b/containernet-git.install
@@ -0,0 +1,18 @@
+post_install() {
+ cat << EOF
+
+ Containernet requires Open vSwitch to be running in order to
+ instantiate switches. To run it, just execute the following
+ commands (as root or using sudo):
+
+ # systemctl enable ovsdb-server.service
+ # systemctl start ovs-vswitchd.service
+ # systemctl enable ovsdb-server.service
+ # systemctl start ovs-vswitchd.service
+
+ Further you will need to install the python docker bindings in version 2.0.2
+ run as root or sudo:
+ # pip2 install docker==2.0.2
+
+EOF
+}