aboutsummaryrefslogtreecommitdiffstats
path: root/main/openvswitch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-06-15 13:00:08 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-06-15 13:00:18 +0000
commit2fd290dadd13a6162f4a730fe121e5b7aa566500 (patch)
tree0efb28ab3d328bd8481ee8a87c24fde5c51549b8 /main/openvswitch
parentcd7bd979eb712928b6d4fbf28eac9e5398b993d2 (diff)
downloadaports-2fd290dadd13a6162f4a730fe121e5b7aa566500.tar.bz2
aports-2fd290dadd13a6162f4a730fe121e5b7aa566500.tar.xz
main/openvswitch: upgrade to 2.9.2 and misc cleanup
- remove unused openvswitch monitor. removed from upstream - enable libcap-ng support - split py2 and py3 packages - split -test package - split -ovn package
Diffstat (limited to 'main/openvswitch')
-rw-r--r--main/openvswitch/APKBUILD101
1 files changed, 86 insertions, 15 deletions
diff --git a/main/openvswitch/APKBUILD b/main/openvswitch/APKBUILD
index 7537b4f13f..df35be33eb 100644
--- a/main/openvswitch/APKBUILD
+++ b/main/openvswitch/APKBUILD
@@ -1,17 +1,24 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=openvswitch
-pkgver=2.9.0
-pkgrel=1
+pkgver=2.9.2
+pkgrel=0
pkgdesc="A production quality, multilayer virtual switch"
url="http://openvswitch.org/"
arch="all"
license="Apache-2.0"
depends=""
+options="!check" # FIXME: no point in running tests if we ignore result
depends_dev="libressl-dev"
-makedepends="$depends_dev perl python2 linux-headers bash py-six"
+makedepends="$depends_dev perl linux-headers bash libcap-ng-dev
+ python2 py2-six python3-dev py3-six py-twisted"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-dev
- $pkgname-monitor::noarch $pkgname-bash-completion:bashcomp:noarch"
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-test:_test
+ py2-$pkgname:_py2:noarch
+ py3-$pkgname:_py3:noarch
+ $pkgname-ovn:_ovn
+ "
source="http://openvswitch.org/releases/$pkgname-$pkgver.tar.gz
ovsdb-server.initd
ovsdb-server.confd
@@ -32,29 +39,29 @@ build() {
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
- --enable-ndebug
+ --enable-ndebug \
+ --enable-libcapng \
+ PYTHON=/usr/bin/python2
make
}
check() {
cd "$builddir"
-
make check || true
}
-monitor() {
- depends="openvswitch py-twisted py-twisted-web2 py-qt"
-
- mkdir -p "$subpkgdir"/usr/share/openvswitch
- mv "$pkgdir"/usr/share/openvswitch/python \
- "$subpkgdir"/usr/share/openvswitch/python
-}
-
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
+ local _py2site=$(python2 -c "import site; print(site.getsitepackages()[0])")
+ local _py3site=$(python3 -c "import site; print(site.getsitepackages()[0])")
+ mkdir -p "$pkgdir/$_py2site" "$pkgdir/$_py3site"
+ cp -a "$pkgdir"/usr/share/openvswitch/python/* "$pkgdir/$_py2site"/
+ cp -a "$pkgdir"/usr/share/openvswitch/python/ovs "$pkgdir/$_py3site"/
+ rm -rf "$pkgdir"/usr/share/openvswitch/python
+
rm -f "$pkgdir"/usr/lib/*.a
install -Dm755 "$srcdir"/ovsdb-server.initd \
"$pkgdir"/etc/init.d/ovsdb-server
@@ -78,6 +85,17 @@ package() {
"$pkgdir"/usr/share/doc/openvswitch/README.alpine
}
+_mv_files() {
+ local i
+ for i in "$@"; do
+ case $i in
+ */*) mkdir -p "$subpkgdir"/${i%/*};;
+ *) mkdir -p "$subpkgdir";;
+ esac
+ mv "$pkgdir"/$i "$subpkgdir"/$i
+ done
+}
+
bashcomp() {
pkgdesc="Bash completions for $pkgname"
depends=""
@@ -88,7 +106,60 @@ bashcomp() {
"$subpkgdir"/usr/share/bash-completion/completions/$pkgname/
}
-sha512sums="c9feb45c650b73093ad1f25f2fc6dbd135dfab691b3322bf87c6efe34bcbfc0a099d1db85c14fe08eb05f4154eae56dd81de54c0a6be97b42a4aa4b6ae53e37b openvswitch-2.9.0.tar.gz
+_test() {
+ pkgdesc="Open vSwitch testing utilities"
+ depends="py2-$pkgname=$pkgver-r$pkgrel py2-twisted"
+ cd "$pkgdir"
+ local _py2site=$(python2 -c "import site; print(site.getsitepackages()[0])")
+ _mv_files \
+ usr/bin/ovs-l3ping \
+ usr/bin/ovs-pcap \
+ usr/bin/ovs-tcpdump \
+ usr/bin/ovs-tcpundump \
+ usr/bin/ovs-test \
+ usr/bin/ovs-testcontroller \
+ usr/bin/ovs-vlan-test \
+ ${_py2site#/}/ovstest
+}
+
+_py2() {
+ pkgdesc="Python modules for Open vSwitch"
+ depends="py2-six"
+ cd "$pkgdir"
+ _mv_files usr/lib/python2*
+}
+
+_py3() {
+ pkgdesc="Python modules for Open vSwitch"
+ depends="py3-six"
+ cd "$pkgdir"
+ _mv_files usr/lib/python3*
+}
+
+_ovn() {
+ pkgdesc="Open Virtual Network support for openvswitch"
+ cd "$pkgdir"
+ _mv_files \
+ usr/share/openvswitch/bugtool-plugins/network-status/ovn.xml \
+ usr/share/openvswitch/scripts/ovn-bugtool-sbctl-show \
+ usr/share/openvswitch/scripts/ovn-ctl \
+ usr/share/openvswitch/scripts/ovn-bugtool-nbctl-show \
+ usr/share/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list \
+ usr/share/openvswitch/scripts/ovndb-servers.ocf \
+ usr/share/openvswitch/ovn-sb.ovsschema \
+ usr/share/openvswitch/ovn-nb.ovsschema \
+ usr/bin/ovn-sbctl \
+ usr/bin/ovn-northd \
+ usr/bin/ovn-trace \
+ usr/bin/ovn-detrace \
+ usr/bin/ovn-nbctl \
+ usr/bin/ovn-controller-vtep \
+ usr/bin/ovn-controller \
+ usr/bin/ovn-docker-underlay-driver \
+ usr/bin/ovn-docker-overlay-driver
+}
+
+sha512sums="6122651fcdeb64793ae7cdd379f55f87ff1f989d6cb5ab67ad83125c566508b474e1875f024d2f2fc2159b90baf383d5e792cbf515a96266126f0f05511ceb0d openvswitch-2.9.2.tar.gz
097d4721a78fff749c534910d98543778474406bd61b469b88a0d981a2a380556444437ec44278cead6d8688c45a38b2acbf1551acb9ab38d048f413728e3b88 ovsdb-server.initd
b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7f6d32916853190336cfe3735f672ad7cb624ae14dbff55a5 ovsdb-server.confd
4bff37f8bed32d5327b4b0433984ab8ffdce77f618034aa6ffd1ad4a7caa00703ea2bef312876dce5aafa4c17fe06dddd75e5c05c10e13bf8f5c3805a0654a96 ovs-vswitchd.initd