aboutsummaryrefslogtreecommitdiffstats
path: root/testing/keepalived/APKBUILD
blob: b75e0e6e0dcef4e0e552e7800df9202cf05f1ae4 (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
# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=keepalived
pkgver=1.2.12
pkgrel=0
pkgdesc="Health Checking for Linux Virtual Server & High-Availability"
url="http://www.keepalived.org/"
arch="all"
license="GPL"
depends=
makedepends="openssl-dev popt-dev linux-headers net-snmp-dev libnl-dev"
install=
subpackages="$pkgname-doc $pkgname-sample-config:samples"
source="http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz
	musl-fix-stdint.patch
	$pkgname.initd
	$pkgname.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	# apply patches here
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--with-kernel-dir=/usr/include/linux \
		--enable-snmp \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname

	rm -r "$pkgdir"/etc/rc.d "$pkgdir"/etc/sysconfig
}

samples() {
	pkgdesc="Sample configuration for keepalived"
	mkdir -p "$subpkgdir"/etc/keepalived/
	mv "$pkgdir"/etc/keepalived/samples "$subpkgdir"/etc/keepalived/
}

md5sums="60f2564acc1e1faa0237b53cf4392d1f  keepalived-1.2.12.tar.gz
04834e595d2ec407830237ad014c173a  musl-fix-stdint.patch
d20faa8d55b8a41b8ddb71bb00a6bead  keepalived.initd
56ff68ad19e973826c2dbc42c892939f  keepalived.confd"
sha256sums="7cd5b1c44b9ec805bb70d208db5962f2c2ff42798c2efd10c6f92e263cf549ab  keepalived-1.2.12.tar.gz
2d8ca0ea51bff4c7f04e4171edc2423f0068a3d972e95e84aabcbb6fb47cb8ee  musl-fix-stdint.patch
a4925cfdbefbee4de59391e320d86538e6ed17a82edc5970fc4b7ea9f42f0787  keepalived.initd
36a6d3345d0ecfd5ca38c2459762f594ff969096e56fa04d8b5b4ee78575d78a  keepalived.confd"
sha512sums="816d5a4e8aa65bd9509f68290b762e67feac235678e0960d8c80ee81cb1b3f16311c17ca5e885f87d5d4698df8cb6c42b19ebdc9f43be125dffaf31e68ef67be  keepalived-1.2.12.tar.gz
3f51c193ac3a80ed7d3b384eb2d7d671b8e41f4985e2d3c23bb6372459fecc77f882247cebd9efb590f2431426ae0fbc7acf5828eae620c86db3eb1a3a6b8d95  musl-fix-stdint.patch
e0928b230743438285cb530341a69b6406b31ead8fcdfed05739770e3ea11ca8162a55479eabfa90d636ad9d2d6c5b1f38946b1e9fcf494ffce87d77db957db3  keepalived.initd
2aec829602c694ae8a4ec669843734f0fb2c9ae2cc6d032d2d724bbcf5da35ad597e7b45df985a2cb6102ed96d60c4d8d9a54da4b734bf1354bb522c4fc705e0  keepalived.confd"