Commit 43995849 authored by Leo's avatar Leo
Browse files

community/openvswitch: drop py2

parent 88d8cf36
Pipeline #1372 passed with stages
in 4 minutes and 4 seconds
......@@ -2,25 +2,23 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=openvswitch
pkgver=2.12.0
pkgrel=0
pkgrel=1
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="openssl-dev"
makedepends="$depends_dev perl linux-headers bash libcap-ng-dev
python2 py2-six python3-dev py3-six py-twisted"
python3 python3-dev py3-six py3-twisted"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-dev
$pkgname-bash-completion:bashcomp:noarch
$pkgname-test:_test
py2-$pkgname:_py2:noarch
py3-$pkgname:_py3:noarch
$pkgname-ovn:_ovn
$pkgname-openrc
"
source="http://openvswitch.org/releases/$pkgname-$pkgver.tar.gz
source="http://openvswitch.org/releases/openvswitch-$pkgver.tar.gz
ovsdb-server.initd
ovsdb-server.confd
ovs-vswitchd.initd
......@@ -30,10 +28,8 @@ source="http://openvswitch.org/releases/$pkgname-$pkgver.tar.gz
readme.debian.patch
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
......@@ -41,25 +37,20 @@ build() {
--localstatedir=/var \
--enable-ndebug \
--enable-libcapng \
PYTHON=/usr/bin/python2
PYTHON=/usr/bin/python3
make
}
check() {
cd "$builddir"
make check || true
}
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"/
mkdir -p "$pkgdir/$_py3site"
cp -a "$pkgdir"/usr/share/openvswitch/python/* "$pkgdir/$_py3site"/
rm -rf "$pkgdir"/usr/share/openvswitch/python
rm -f "$pkgdir"/usr/lib/*.a
......@@ -108,30 +99,20 @@ bashcomp() {
_test() {
pkgdesc="Open vSwitch testing utilities"
depends="py2-$pkgname=$pkgver-r$pkgrel py-twisted"
depends="py3-$pkgname=$pkgver-r$pkgrel py-twisted"
cd "$pkgdir"
local _py2site=$(python2 -c "import site; print(site.getsitepackages()[0])")
local _py3site=$(python3 -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*
${_py3site#/}/ovstest
}
_py3() {
pkgdesc="Python modules for Open vSwitch"
depends="py3-six"
depends="python3 py3-six"
cd "$pkgdir"
_mv_files usr/lib/python3*
}
......@@ -140,11 +121,7 @@ _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 \
......
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