summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Martinez-Julia2015-07-21 11:23:13 +0200
committerPedro Martinez-Julia2015-07-21 11:23:13 +0200
commit2cad45f929f7e5b070261259ce1978ec2e996fc0 (patch)
treebb3dc8fdfb7caa38f099977af8271357abc37855
downloadaur-2cad45f929f7e5b070261259ce1978ec2e996fc0.tar.gz
Initial import
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD37
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..719e280363d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = mininet
+ pkgdesc = Process-based network emulator (stable branch)
+ pkgver = 2.2.1
+ pkgrel = 2
+ url = https://github.com/mininet/mininet/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = help2man
+ makedepends = python2-setuptools
+ depends = bash
+ depends = python2
+ depends = python2-networkx
+ depends = net-tools
+ depends = iputils
+ depends = iperf
+ optdepends = openvswitch
+ optdepends = xorg-xhost
+ source = git://github.com/mininet/mininet.git
+ md5sums = SKIP
+
+pkgname = mininet
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..aaa48bebee9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Pedro Martinez-Julia <pedromj@gmail.com>
+# Contributor: Walter Dworak <preparationh67@gmail.com>
+
+pkgname=mininet
+pkgver=2.2.1
+pkgrel=2
+pkgdesc="Process-based network emulator (stable branch)"
+url="https://github.com/mininet/mininet/"
+license=('custom')
+depends=('bash' 'python2' 'python2-networkx' 'net-tools' 'iputils' 'iperf')
+optdepends=('openvswitch' 'xorg-xhost')
+makedepends=('help2man' 'python2-setuptools')
+arch=('i686' 'x86_64')
+source=("git://github.com/mininet/mininet.git")
+md5sums=('SKIP')
+
+prepare () {
+ cd "$srcdir/$pkgname"
+ git checkout -b 2.2.1 2.2.1
+ 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: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
+}
+
+build () {
+ cd "$srcdir/$pkgname"
+}
+
+package () {
+ cd "$srcdir/$pkgname"
+ make DESTDIR="${pkgdir}" install
+}