aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openvswitch/APKBUILD
blob: 85ef6f8ddd07362d7f940fbb6e747ad7258f094e (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=openvswitch
pkgver=1.7.1
pkgrel=0
pkgdesc="an open virtual switch"
url="http://openvswitch.org/"
arch="all"
license="GPL"
depends=""
depends_dev="openssl-dev"
depends_monitor="py-twisted py-twisted-web2 py-qt"
makedepends="$depends_dev $depends_monitor"
install="openvswitch.post-install openvswitch.post-upgrade"
subpackages="$pkgname-doc $pkgname-monitor"
source="http://openvswitch.org/releases/openvswitch-$pkgver.tar.gz
	ovsdb-server.initd
	ovsdb-server.confd
	ovs-controller.initd
	ovs-controller.confd
	ovs-vswitchd.initd
	ovs-vswitchd.confd"

_builddir="$srcdir"/openvswitch-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

monitor() {
	depends="openvswitch $depends_monitor"
	mkdir -p "$subpkgdir"/usr/share/openvswitch
	mv "$pkgdir"/usr/share/openvswitch/python "$subpkgdir"/usr/share/openvswitch/python
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la

	install -Dm755 "$srcdir"/ovsdb-server.initd "$pkgdir"/etc/init.d/ovsdb-server
	install -Dm755 "$srcdir"/ovs-controller.initd "$pkgdir"/etc/init.d/ovs-controller
	install -Dm755 "$srcdir"/ovs-vswitchd.initd "$pkgdir"/etc/init.d/ovs-vswitchd

	install -Dm644 "$srcdir"/ovsdb-server.confd "$pkgdir"/etc/conf.d/ovsdb-server
	install -Dm644 "$srcdir"/ovs-controller.confd "$pkgdir"/etc/conf.d/ovs-controller
	install -Dm644 "$srcdir"/ovs-vswitchd.confd "$pkgdir"/etc/conf.d/ovs-vswitchd
}

md5sums="70a7076f84cdb4c0ee86c380e7f7aa78  openvswitch-1.7.1.tar.gz
8cc7f62777212fab9fc1c8c506a32e65  ovsdb-server.initd
9c2c1d774be02f2e69609bcc4f24a370  ovsdb-server.confd
4e6e5afd1dc2d3bc1043dab19cd9f61f  ovs-controller.initd
0f5ce60dda512b29d4e20cb832e062d4  ovs-controller.confd
623db751bbdc390d9e9c076c0ce9a6b2  ovs-vswitchd.initd
2d1e0111ea62779f49e14d62678294b2  ovs-vswitchd.confd"