blob: 698e796260044b4784ed192b2174229dd2287328 (
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
111
112
|
# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=keepalived
pkgver=1.2.24
pkgrel=1
pkgdesc="Health Checking for Linux Virtual Server & High-Availability"
url="http://www.keepalived.org/"
arch="all"
license="GPL"
depends="$pkgname-common !$pkgname-snmp"
makedepends="libressl-dev popt-dev linux-headers net-snmp-dev libnl-dev
libnfnetlink-dev automake autoconf"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-sample-config:samples:noarch
$pkgname-common $pkgname-snmp"
source="http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
fix-configure.patch
"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
default_prepare || return 1
# The build scripts are somehow broken, so we must regenerate them.
autoreconf -fiv || return 1
cp -ar "$builddir" "$builddir-snmp"
}
build() {
cd "$builddir-snmp"
_build --enable-snmp || return 1
cd "$builddir"
_build
}
_build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--with-kernel-dir=/usr/include/linux \
--enable-vrrp \
--enable-sha1 \
$@ || return 1
make || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
local f; for f in AUTHOR CONTRIBUTORS ChangeLog README INSTALL TODO \
genhash/README genhash/AUTHOR genhash/ChangeLog; do
install -m644 -D $f "$pkgdir"/usr/share/doc/$pkgname/$f || return 1
done
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
# Clean up sysvinit files
rm -rf "$pkgdir"/etc/rc.d "$pkgdir"/etc/sysconfig
}
common() {
depends=""
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/etc "$subpkgdir"/ || return 1
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
snmp() {
pkgdesc="$pkgdesc (with SNMP support)"
depends="$pkgname-common !$pkgname"
cd "$builddir-snmp"
install -m700 -D bin/keepalived "$subpkgdir"/usr/sbin/keepalived || return 1
mkdir -p "$subpkgdir"/usr/share/snmp/mibs
install -m644 doc/*-MIB "$subpkgdir"/usr/share/snmp/mibs/
}
samples() {
pkgdesc="Sample configuration for keepalived"
mkdir -p "$subpkgdir"/etc/keepalived/
mv "$pkgdir"/etc/keepalived/samples "$subpkgdir"/etc/keepalived/
}
md5sums="e878312095b7dcab91ad06e257822247 keepalived-1.2.24.tar.gz
ad67cf11d9fc60f55eff562728a16863 keepalived.initd
252a289af5b7c7ec6f0cb3fe48f57486 keepalived.confd
a2283ead67c71ec937a64cfecbb3eb66 fix-configure.patch"
sha256sums="3071804478077e606197a2348b5733d7d53af2843906af5e0d544945565c36ef keepalived-1.2.24.tar.gz
535bcfe41410a86e6640bf8c8c8ddb31546ba83476fceef8e0799121737ee5c2 keepalived.initd
4e655777aa3d6afa6cd746e84aa87fbb356c6d4cac9846c3a2f8805d65763497 keepalived.confd
0ccc131d013959b430f44ad9a7e9fa5ddbe068cfe2af31ed72d30e8ef394a77e fix-configure.patch"
sha512sums="a5e555dd955173887896155a04b1f6bb0c2f2a758008472abd5433b057be3fd85e4f270a7b7eb2f36a1c16e46b235ef930b1844938276528ff61bbdd783bb1f5 keepalived-1.2.24.tar.gz
12361313dd044269150c9ea1a4ffc6987075b0106dfdd4b3804b1852d2a47f608d954ab473419474747b475c98fade3779800be8147134969016817cfa050ee4 keepalived.initd
413cb05aa2d1d8c0f552398bb5d511ee022b4d07f5b18217350c1159d013f2d26d87ae63d2977329ec78d7416760e84c4048a5ad20a1f63ef2bc3a1a84c3a41a keepalived.confd
6d24889d83bc3ec6d4d8636380477576ffb6439dc49ff0b59be50a5afe41d1050bbad6f938fc9b5cb4b9cc64b8de9d6c058d8ef1bb721420140ae467656b5429 fix-configure.patch"
|