aboutsummaryrefslogtreecommitdiffstats
path: root/community/openvswitch/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-10-23 03:58:45 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-10-23 18:20:54 -0300
commit46ed2e3d1aee2714f6500cd59792bcc53c40c754 (patch)
treee7fe258d28b12cbb95df8b6459a61b56406265b0 /community/openvswitch/APKBUILD
parent5a8c200719147577344536a944fe7f24e0f4282d (diff)
downloadaports-46ed2e3d1aee2714f6500cd59792bcc53c40c754.tar.bz2
aports-46ed2e3d1aee2714f6500cd59792bcc53c40c754.tar.xz
community/openvswitch: drop py2
Diffstat (limited to 'community/openvswitch/APKBUILD')
-rw-r--r--community/openvswitch/APKBUILD43
1 files changed, 10 insertions, 33 deletions
diff --git a/community/openvswitch/APKBUILD b/community/openvswitch/APKBUILD
index 3e12d096b2..4c4fc0b2ee 100644
--- a/community/openvswitch/APKBUILD
+++ b/community/openvswitch/APKBUILD
@@ -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 \