APKBUILD 4.86 KB
Newer Older
1 2
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
3
pkgname=openvswitch
4
pkgver=2.3.0
5 6
pkgrel=6
pkgdesc="A production quality, multilayer virtual switch"
7 8
url="http://openvswitch.org/"
arch="all"
9
license="ASL 2.0"
10 11
depends=""
depends_dev="openssl-dev"
12
makedepends="$depends_dev perl python"
13
install=""
14
subpackages="$pkgname-doc $pkgname-dbg $pkgname-monitor"
15
source="http://openvswitch.org/releases/$pkgname-$pkgver.tar.gz
16 17 18
	ovsdb-server.initd
	ovsdb-server.confd
	ovs-vswitchd.initd
19
	ovs-vswitchd.confd
20 21
	ovs-modules.initd
	musl-if_packet.patch
22
	0001-ovs-thread-Set-stacksize-to-1M.patch
23
	ifupdown-alpine.patch
24
	"
25 26

_builddir="$srcdir"/$pkgname-$pkgver
27 28 29

prepare() {
	local i
30
        cd "$_builddir"
31

32 33 34 35 36
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
37 38 39 40 41 42 43 44 45
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
46
		--enable-ndebug \
47
		|| return 1
48
	make || return 1
49 50 51
}

monitor() {
52 53
	depends="openvswitch py-twisted py-twisted-web2 py-qt"
	arch="noarch"
54
	mkdir -p "$subpkgdir"/usr/share/openvswitch
55 56
	mv "$pkgdir"/usr/share/openvswitch/python \
		"$subpkgdir"/usr/share/openvswitch/python
57 58 59 60 61 62
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
63
	rm -f "$pkgdir"/usr/lib/*.a
64 65 66 67 68 69 70 71 72 73
	install -Dm755 "$srcdir"/ovsdb-server.initd \
		"$pkgdir"/etc/init.d/ovsdb-server || return 1
	install -Dm755 "$srcdir"/ovs-vswitchd.initd \
		"$pkgdir"/etc/init.d/ovs-vswitchd || return 1
	install -Dm755 "$srcdir"/ovs-modules.initd \
		"$pkgdir"/etc/init.d/ovs-modules || return 1
	install -Dm644 "$srcdir"/ovsdb-server.confd \
		"$pkgdir"/etc/conf.d/ovsdb-server || return 1
	install -Dm644 "$srcdir"/ovs-vswitchd.confd \
		"$pkgdir"/etc/conf.d/ovs-vswitchd
74 75 76 77 78 79 80

	install -d "$pkgdir"/etc/network/if-pre-up.d \
		"$pkgdir"/etc/network/if-post-down.d || return 1
	install -m755 debian/ifupdown.sh \
		"$pkgdir"/etc/network/if-pre-up.d/openvswitch || return 1
	ln -s ../if-pre-up.d/openvswitch \
		"$pkgdir"/etc/network/if-post-down.d/openvswitch || return 1
81 82
}

83
md5sums="9c4d1471a56718132e0157af1bfc9310  openvswitch-2.3.0.tar.gz
84
b31c5fff2ba358dc6af49ab6ffcdecbf  ovsdb-server.initd
85
f10a8ac784654bec359bda52779f16fe  ovsdb-server.confd
86
93e79e5a556e6fe03121cf7b63f7f2a2  ovs-vswitchd.initd
87
2d1e0111ea62779f49e14d62678294b2  ovs-vswitchd.confd
88
ae128e5c349710c0fb3849b2d3b3aa40  ovs-modules.initd
89
6e17032bd6e7caf6e6e844b5a84d7080  musl-if_packet.patch
90 91
59fa9a6d293a25571562a5190ae559f2  0001-ovs-thread-Set-stacksize-to-1M.patch
efb3c073b7c475d9fb3999a38e4f92c0  ifupdown-alpine.patch"
92
sha256sums="011052645cd4c7afee2732e87d45e589a0540ac7b7523027d3be2d7c7db7c899  openvswitch-2.3.0.tar.gz
93
d7791b1e7e84955489f88e457631c6cedfeff26c5865c8569b69e1bd96633dc7  ovsdb-server.initd
94
d0d8a6a7256f4cc47ab1b9f9f7657202388133bcfff3668e7c1d4adbcc572261  ovsdb-server.confd
95
be2c3d3df016462a5d633ec24faf7cb9f3e5ff87f860d9a5e65571d167e90d38  ovs-vswitchd.initd
96
cc189d5ca24708ff775a4de312df3f611c65714724b8901ec6527c9e3f22e14a  ovs-vswitchd.confd
97
94f4dba5e2ddedb9c91911b02dbfc41a5114e8a5066a8db3ef4444ebb5400173  ovs-modules.initd
98
d0e9e3e30b2943b10e7efa59c41c3bf8d5b599d55fc99198146bf4761df4d8ae  musl-if_packet.patch
99 100
faf997814e89b0b5948c06050ef38051f0bc6b108958f76313263f77a724906c  0001-ovs-thread-Set-stacksize-to-1M.patch
d2284376febcdb465ef2f216be01be52dab2a9726624b12c5cc47fb0d955d1b1  ifupdown-alpine.patch"
101
sha512sums="f3a665bc84d8a6e282928db61ae648a826f273e44e34311a60e6f0e74a6ab10c8410cb374f0ce80abe7c58b9559a97388cdbfe2ef28ac4bedd2f5e52b3cd6ed1  openvswitch-2.3.0.tar.gz
102
7b6b0a3c42839053d21ff72b576d92ba08ee5d900faa25fa04a183114a55c4d7dc85538cd7d3333386a27d7a7f632c1d2a38a2b950972c29d11d96addaffa27c  ovsdb-server.initd
103
b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7f6d32916853190336cfe3735f672ad7cb624ae14dbff55a5  ovsdb-server.confd
104
1b929c25a4b902122550003d23ae178580fa175c57427050c43504b33e212d3d76ff4f1f266a5f815165e9c014d044d8bf3815432fbd86c5f7ee854bcace6d94  ovs-vswitchd.initd
105
346aea099f51707d2b4fc9fdc8c1502582723fb4e00c4d5d1624b0378c94dfb76674fa95e2af894f36169df52109dbe441ee6a45aa744584d9e4c74d15a46c1d  ovs-vswitchd.confd
106
e1f88ff11cd1d5a4025626acad49411e8a2d5d7caa20d0a63ef0422a9b1bb55b070843327d8bb209e1e915d2a3f1c3bcae911acf40e0a419bc6cce6250239232  ovs-modules.initd
107
1ebfb2629081cc0b34383e6c2f163f3c1d43da3a399b8ba8745871b77029d3b8fc21a287ff859a6a9cca2cb4885715458d4e4086cb6c17765ff7c898d4004850  musl-if_packet.patch
108 109
5fed04e68b58ab322154fa1cc4c4b63b08c22ed41f0b7713dbe8437f7cb4e9fd93c8aba524c2e5a46bba956da9439f5bfe5ba6fcdff2b98fa9bbcc748c5b64db  0001-ovs-thread-Set-stacksize-to-1M.patch
eb24886fd8110adde4a68f7ab0887af0cdf88e27d58f030208a0a9d7aef0065b8c5f7e2d489ff48c82ba386fbb9575c0273c5d4958e2638263ea78824242354e  ifupdown-alpine.patch"