diff options
author | Filippo Berto | 2020-08-10 18:34:19 +0200 |
---|---|---|
committer | Filippo Berto | 2020-08-10 18:34:19 +0200 |
commit | e047494222df142841a00ef6ef66028e7ebf36f4 (patch) | |
tree | 52cc675624b7e12602b31a2f00148f82208df12d | |
download | aur-mininet-git-python2.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | mininet.install | 11 |
3 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6636c93aabd9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,39 @@ +pkgbase = mininet-git-python2 + pkgdesc = Emulator for rapid prototyping of Software Defined Networks (Python 2 version) + pkgver = 2.3.0d6.r22.gbfc42f6 + pkgrel = 1 + url = https://github.com/mininet/mininet + install = mininet.install + arch = x86_64 + license = custom + makedepends = git + makedepends = gcc + makedepends = make + makedepends = autoconf + makedepends = automake + makedepends = libtool + makedepends = help2man + makedepends = python2-setuptools + depends = python2 + depends = iproute2 + depends = net-tools + depends = iputils + depends = inetutils + depends = iperf + depends = ethtool + depends = libcgroup + depends = openvswitch + depends = psmisc + optdepends = xorg-xhost: for X11 forwarding + optdepends = socat: for X11 forwarding + optdepends = xterm: terminal emulator for X11 + provides = mininet + conflicts = mininet + replaces = mininet + source = mininet-git-python2::git+https://github.com/mininet/mininet.git + source = git+https://github.com/mininet/openflow.git + sha256sums = SKIP + sha256sums = SKIP + +pkgname = mininet-git-python2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8bf3b31f6b59 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Kuan-Yen Chou <kuanyenchou@gmail.com> + +pkgname=mininet-git-python2 +pkgver=2.3.0d6.r22.gbfc42f6 +pkgrel=1 +pkgdesc='Emulator for rapid prototyping of Software Defined Networks (Python 2 version)' +depends=('python2' 'iproute2' 'net-tools' 'iputils' 'inetutils' 'iperf' 'ethtool' + 'libcgroup' 'openvswitch' 'psmisc') +optdepends=('xorg-xhost: for X11 forwarding' + 'socat: for X11 forwarding' + 'xterm: terminal emulator for X11') +makedepends=('git' 'gcc' 'make' 'autoconf' 'automake' 'libtool' 'help2man' + 'python2-setuptools') +arch=('x86_64') +url='https://github.com/mininet/mininet' +license=('custom') +provides=('mininet') +conflicts=('mininet') +replaces=('mininet') +install=mininet.install +source=("$pkgname"::'git+https://github.com/mininet/mininet.git' + 'git+https://github.com/mininet/openflow.git') # for the UserSwitch +sha256sums=('SKIP' + 'SKIP') + +pkgver() { + cd "$srcdir/$pkgname" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir/openflow" + sed '/^include debian\/automake.mk/d' -i Makefile.am + + cd "$srcdir/$pkgname" + sed 's/python/python2/' -i Makefile + sed 's:PREFIX ?= /usr:PREFIX ?= "$(DESTDIR)"/usr:' -i Makefile + sed 's:$(PYTHON) setup.py install:$(PYTHON) setup.py install --prefix=/usr --root="$(DESTDIR)" --optimize=1:' -i Makefile +} + +build() { + cd "$srcdir/openflow" + autoreconf --install --force + ./configure --prefix=/usr --sbindir=/usr/bin + make + + cd "$srcdir/$pkgname" + make mnexec man +} + +package() { + cd "$srcdir/openflow" + make DESTDIR="${pkgdir}" install + + cd "$srcdir/$pkgname" + make DESTDIR="${pkgdir}" install + install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/mininet/LICENSE" +} + +# vim: set sw=4 ts=4 et: diff --git a/mininet.install b/mininet.install new file mode 100644 index 000000000000..8f97dff6d856 --- /dev/null +++ b/mininet.install @@ -0,0 +1,11 @@ +post_install() { + cat << EOF + + Mininet 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 --now ovs-vswitchd.service + +EOF +} |