blob: a976416d34e294180c3fccac95c8176c6a3fc131 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ovn
pkgver=23.09.0
ovs_pkgver=3.2.1
pkgrel=0
pkgdesc="Open Virtual Network"
url="https://www.ovn.org"
arch="all"
license="Apache-2.0"
makedepends="automake
autoconf
libtool
libcap-ng-dev
linux-headers
openssl-dev>3
python3
unbound-dev
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg $pkgname-openrc"
giturl="https://github.com/openvswitch/ovs.git"
_gitrev="498cedc"
options="!check" # most of the tests are failing
source="$pkgname-$pkgver.tar.gz::https://github.com/ovn-org/ovn/archive/refs/tags/v$pkgver.tar.gz
openvswitch-$ovs_pkgver.tar.gz::https://github.com/openvswitch/ovs/archive/refs/tags/v$ovs_pkgver.tar.gz
ovn-ctl.confd
ovn-northd.initd
ovn-ovsdb-server-nb.initd
ovn-ovsdb-server-sb.initd
"
provides="openvswitch=$ovs_pkgver"
# https://dev.alpinelinux.org/archive/ovn/openvswitch-$ovs_pkgver-$_gitrev.tar.gz
snapshot() {
mkdir -p "$srcdir"
cd "$srcdir"
if ! [ -d ovs ]; then git clone $giturl; fi
cd ovs
git archive --prefix=openvswitch-$ovs_pkgver/ -o "$srcdir"/openvswitch-$ovs_pkgver-$_gitrev.tar.gz $_gitrev
scp "$srcdir"/openvswitch-$ovs_pkgver-$_gitrev.tar.gz dev.alpinelinux.org:/archive/$pkgname/
}
prepare() {
default_prepare
./boot.sh
cd "$srcdir"/ovs-$ovs_pkgver
./boot.sh
}
build() {
export CFLAGS="$CFLAGS -fPIC"
# First OpenVSwitch must be built
# Taking the same configure options from openvswitch APKBUILD
cd "$srcdir"/ovs-$ovs_pkgver
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-ndebug \
--enable-libcap-ng
make
msg "Built OVS. Now building OVN"
cd "$builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-shared \
--with-ovs-source=../ovs-$ovs_pkgver \
--with-ovs-build=../ovs-$ovs_pkgver
make
}
check() {
make check
}
package() {
# parallel install issue
make -j1 DESTDIR="$pkgdir" install
# install the required version of OpenVSwitch
cd "$srcdir/ovs-$ovs_pkgver"
make DESTDIR="$pkgdir" install
# remove unneeded ovs files
rm -rf "$pkgdir"/etc
rm -rf "$pkgdir"/var
for f in ovn-northd \
ovn-ovsdb-server-nb \
ovn-ovsdb-server-sb \
; do
install -Dm755 ../"$f".initd "$pkgdir/etc/init.d/$f"
install -Dm644 ../ovn-ctl.confd "$pkgdir/etc/conf.d/$f"
done
}
sha512sums="
90fb0496e7a219fa8a4cf22daa40ce54a7e8174228d1baa6946c399a81fed7ba380a8e0a93ad8da6a83aaf47c22312637541e449e076f08884fc9dd28179e6fd ovn-23.09.0.tar.gz
709e7a39c97d44cb4fc2741ec386d2bb446adf4c374d5d15480dc62e49d5e327354eb81ca09b55b0c0954dd42b28d3bd278840247d42b2f8802e667f90bd8c97 openvswitch-3.2.1.tar.gz
b98fd4acefcc03714cebe18dd78839ec1e6777ed6b1b035873b7a05c24ce5c91b62d890543e58529ed47413c4ab926468a9915bf15675475712ac039f9d1cda5 ovn-ctl.confd
9208004e2615f39e4432741781a38ba8d0f312a3a728e51d32f45bccecd3012d869cc7d3f1a77a850ff6803f93e2e0fac49a77f9136ec8faa553df50d4545936 ovn-northd.initd
c57f8728c6cd46dee838ff8a5093c736632782e469fdc87c840c70dacc69bc46e83b96e03bcac308b0d109bcbeea118e28a7c4487e60ff0296ed5b5ad68a6dfb ovn-ovsdb-server-nb.initd
11a670dfec6d20290cff20faea95aadc520984a45047b5baf798c89bdea46fab699b2a499c1f2e1c31e14a0c670dd554c061b35185977e7e9ebce42eb388786e ovn-ovsdb-server-sb.initd
"
|