Commit 8d64af67 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Initial commit

parents
include:
- project: 'gitlab/gitlab-ci-package-template'
ref: master
file: '/packages.yml'
# Maintainer: Nigel Kukard <nkukard@LBSD.net>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Pedro Martinez-Julia (pedromj@um.es)
# Contributor: Matt Monaco <net 0x01b dgbaley27>
pkgname=openvswitch
pkgver=2.15.1
pkgrel=1.1
pkgdesc="Production Quality, Multilayer Open Virtual Switch"
url="http://openvswitch.org"
license=('APACHE')
arch=(x86_64)
install=openvswitch.install
source=("http://openvswitch.org/releases/openvswitch-$pkgver.tar.gz"
openvswitch.tmpfiles
ovsdb-server.service
ovs-vswitchd.service)
depends=('openssl' 'libcap-ng' 'dpdk')
makedepends=('python-six')
optdepends=('python-six')
sha256sums=('5c7baed537364d43af36c15dde298c95d35cb2cb3204b4d3fe9b0fc73c97f16d'
'e8dc21e50fc886bfd6aa55991bdb3cb66907e11b071045452bb12de01a3ecbd9'
'fa2412b81c77921418131a4f6fd38956f50ffcc7b908ec91f94d3607a05d060b'
'679c8f03b78bba03237c6135f1bd7711430248e8477202c8b0de4ff4828b9f61')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
sed -i \
-e 's|$(sysconfdir)/bash_completion.d|/usr/share/bash-completion/completions|g' \
Makefile.am
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./boot.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-rundir=/run/openvswitch \
--sbindir=/usr/bin \
--with-dpdk=shared \
PYTHON=/usr/bin/python2
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
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
}
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
}
post_upgrade() {
post_install
}
d /run/openvswitch 0770 root root -
[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
[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
[package openvswitch]
set=idms
repo=idms-community
path=.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment