summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2015-06-10 10:39:54 -0600
committerBrian Bidulock2015-06-10 10:39:54 -0600
commit14cff49354f6b2c051338ec213adc46c1a608d5a (patch)
treea6b4bdb165d96847473d7a927bc306c43f3b0961
downloadaur-14cff49354f6b2c051338ec213adc46c1a608d5a.tar.gz
initial version
-rw-r--r--.SRCINFO27
-rwxr-xr-xPKGBUILD56
-rw-r--r--openvswitch.install14
-rwxr-xr-xopenvswitch.tmpfiles1
-rw-r--r--ovs-vswitchd.service15
-rw-r--r--ovsdb-server.service7
6 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8928c4655f98
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = openvswitch-git
+ pkgdesc = Production Quality, Multilayer Open Virtual Switch
+ pkgver = 2.3.1.r55.g1cb39f3
+ pkgrel = 1
+ epoch = 1
+ url = http://openvswitch.org
+ install = openvswitch.install
+ arch = x86_64
+ arch = i686
+ license = APACHE
+ makedepends = python2
+ makedepends = git
+ depends = openssl
+ optdepends = python2
+ provides = openvswitch
+ conflicts = openvswitch
+ source = openvswitch-git::git+https://github.com/openvswitch/ovs.git#branch=branch-2.3
+ source = openvswitch.tmpfiles
+ source = ovsdb-server.service
+ source = ovs-vswitchd.service
+ md5sums = SKIP
+ md5sums = 0534c19ed27d2ff8c6b32d87c07bc76f
+ md5sums = 3a1b706c1adfb1166b58bc9d65ea396f
+ md5sums = 4ec9c05448d6910c5fd581e964518ef7
+
+pkgname = openvswitch-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..e1c51009b006
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 123805 2014-12-12 10:28:49Z spupykin $
+# Maintainer: Brian Bidulock <bidulock@openss7.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Pedro Martinez-Julia (pedromj@um.es)
+# Contributor: Matt Monaco <net 0x01b dgbaley27>
+
+pkgname=openvswitch-git
+epoch=1
+pkgver=2.3.1.r55.g1cb39f3
+pkgrel=1
+pkgdesc="Production Quality, Multilayer Open Virtual Switch"
+url="http://openvswitch.org"
+license=('APACHE')
+arch=(x86_64 i686)
+install="openvswitch.install"
+source=("$pkgname::git+https://github.com/openvswitch/ovs.git#branch=branch-2.3"
+ openvswitch.tmpfiles
+ ovsdb-server.service
+ ovs-vswitchd.service)
+depends=('openssl')
+makedepends=('python2' 'git')
+optdepends=('python2')
+md5sums=('SKIP'
+ '0534c19ed27d2ff8c6b32d87c07bc76f'
+ '3a1b706c1adfb1166b58bc9d65ea396f'
+ '4ec9c05448d6910c5fd581e964518ef7')
+provides=('openvswitch')
+conflicts=('openvswitch')
+
+pkgver() {
+ cd $pkgname
+ git describe --long --tags | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+build() {
+ cd $pkgname
+ ./boot.sh
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-rundir=/run/openvswitch \
+ --sbindir=/usr/bin \
+ PYTHON=/usr/bin/python2
+ make
+}
+
+package() {
+ cd $pkgname
+ make DESTDIR="$pkgdir" install
+ install -Dm0644 $srcdir/openvswitch.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/openvswitch.conf"
+ install -Dm0644 $srcdir/ovsdb-server.service "$pkgdir/usr/lib/systemd/system/ovsdb-server.service"
+ install -Dm0644 $srcdir/ovs-vswitchd.service "$pkgdir/usr/lib/systemd/system/ovs-vswitchd.service"
+ install -dm0755 "$pkgdir/etc/openvswitch"
+ rm -rf $pkgdir/run
+}
diff --git a/openvswitch.install b/openvswitch.install
new file mode 100644
index 000000000000..b9ee27005de6
--- /dev/null
+++ b/openvswitch.install
@@ -0,0 +1,14 @@
+post_install() {
+ if [[ ! -f etc/openvswitch/conf.db ]]; then
+ cmd=(ovsdb-tool create
+ etc/openvswitch/conf.db
+ usr/share/openvswitch/vswitch.ovsschema)
+ printf "Running: %s\n" "${cmd[*]}"
+ "${cmd[@]}"
+ fi
+ systemd-tmpfiles --create openvswitch.conf
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/openvswitch.tmpfiles b/openvswitch.tmpfiles
new file mode 100755
index 000000000000..f99f19f89fb2
--- /dev/null
+++ b/openvswitch.tmpfiles
@@ -0,0 +1 @@
+d /run/openvswitch 0770 root root -
diff --git a/ovs-vswitchd.service b/ovs-vswitchd.service
new file mode 100644
index 000000000000..f845e04cf4a7
--- /dev/null
+++ b/ovs-vswitchd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description = Open vSwitch Daemon
+Documentation = man:ovs-vswitchd
+Wants = network.target
+Before = network.target
+Requires = ovsdb-server.service
+After = ovsdb-server.service
+
+[Service]
+ExecStartPre = /sbin/modprobe openvswitch
+PIDFile = /run/openvswitch/ovs-vswitchd.pid
+ExecStart = /usr/sbin/ovs-vswitchd --pidfile=/run/openvswitch/ovs-vswitchd.pid
+
+[Install]
+WantedBy = multi-user.target
diff --git a/ovsdb-server.service b/ovsdb-server.service
new file mode 100644
index 000000000000..6bcb76bb2fa2
--- /dev/null
+++ b/ovsdb-server.service
@@ -0,0 +1,7 @@
+[Unit]
+Description = Open vSwitch Database Server
+Documentation = man:ovsdb-server
+
+[Service]
+PIDFile=/run/openvswitch/ovsdb-server.pid
+ExecStart=/usr/sbin/ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --pidfile=/run/openvswitch/ovsdb-server.pid