1SUMMARY = "High Availability monitor built upon LVS, VRRP and service pollers"
2DESCRIPTION = "Keepalived is a routing software written in C. The main goal \
3of this project is to provide simple and robust facilities for loadbalancing \
4and high-availability to Linux system and Linux based infrastructures. \
5Loadbalancing framework relies on well-known and widely used Linux Virtual \
6Server (IPVS) kernel module providing Layer4 loadbalancing \
7"
8HOMEPAGE = "http://www.keepalived.org/"
9
10LICENSE = "GPL-2.0-only"
11LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
12
13SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz \
14           "
15SRC_URI[sha256sum] = "85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6"
16UPSTREAM_CHECK_URI = "https://github.com/acassen/keepalived/releases"
17
18DEPENDS = "libnfnetlink openssl"
19
20inherit autotools pkgconfig systemd
21
22PACKAGECONFIG ??= "libnl snmp \
23    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
24"
25PACKAGECONFIG[libnl] = "--enable-libnl,--disable-libnl,libnl"
26PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
27PACKAGECONFIG[systemd] = "--with-init=systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--with-init=SYSV,systemd"
28
29EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
30
31export EXTRA_CFLAGS = "${CFLAGS}"
32
33do_install:append() {
34    if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
35        chmod 0755 ${D}${sysconfdir}/init.d/${BPN}
36        sed -i 's#rc.d/##' ${D}${sysconfdir}/init.d/${BPN}
37    fi
38
39    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
40        install -D -m 0644 ${B}/${BPN}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
41    fi
42}
43
44FILES:${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt"
45
46SYSTEMD_SERVICE:${PN} = "keepalived.service"
47SYSTEMD_AUTO_ENABLE ?= "disable"
48