blob: 0199487e2e5db773d5bf55988e9faa28f6ae127f [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001SUMMARY = "Software watchdog"
2DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
3working. If programs in user space are not longer executed \
4it will reboot the system."
5HOMEPAGE = "http://watchdog.sourceforge.net/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
7
8LICENSE = "GPL-2.0+"
Andrew Geissler1e34c2d2020-05-29 16:02:59 -05009LIC_FILES_CHKSUM = "file://COPYING;md5=084236108b1d4a9851bf5213fea586fd"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060010
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
Brad Bishop316dfdd2018-06-25 12:45:53 -040012 file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013 file://watchdog.init \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060014 file://wd_keepalive.init \
15"
16
Andrew Geissler1e34c2d2020-05-29 16:02:59 -050017SRC_URI[md5sum] = "1b4f51cabc64d1bee2fce7cdd626831f"
18SRC_URI[sha256sum] = "b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060019
20UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
21UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
22
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023inherit autotools update-rc.d systemd pkgconfig
Patrick Williamsc0f7c042017-02-23 20:41:17 -060024
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025DEPENDS += "libtirpc"
26CFLAGS += "-I${STAGING_INCDIR}/tirpc"
27LDFLAGS += "-ltirpc"
28
29EXTRA_OECONF += " --disable-nfs "
Patrick Williamsc0f7c042017-02-23 20:41:17 -060030
31INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
32
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033INITSCRIPT_NAME_${PN} = "watchdog"
34INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035
36INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060038
Brad Bishop316dfdd2018-06-25 12:45:53 -040039SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
40SYSTEMD_SERVICE_${PN} = "watchdog.service"
41SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042# When using systemd, consider making use of internal watchdog support of systemd.
43# See RuntimeWatchdogSec in /etc/systemd/system.conf.
44SYSTEMD_AUTO_ENABLE = "disable"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046do_install_append() {
47 install -d ${D}${systemd_system_unitdir}
48 install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
49 install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}
50
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
Brad Bishopd7bf8c12018-02-25 22:55:05 -050052 install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
53
54 # watchdog.conf is provided by the watchdog-config recipe
55 rm ${D}${sysconfdir}/watchdog.conf
Patrick Williamsc0f7c042017-02-23 20:41:17 -060056}
57
58PACKAGES =+ "${PN}-keepalive"
59
60FILES_${PN}-keepalive = " \
61 ${sysconfdir}/init.d/wd_keepalive \
Brad Bishop316dfdd2018-06-25 12:45:53 -040062 ${systemd_system_unitdir}/wd_keepalive.service \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060063 ${sbindir}/wd_keepalive \
64"
65
Brad Bishop6e60e8b2018-02-01 10:27:11 -050066RDEPENDS_${PN} += "${PN}-config"
67RRECOMMENDS_${PN} += "kernel-module-softdog"
68
Patrick Williamsc0f7c042017-02-23 20:41:17 -060069RDEPENDS_${PN}-keepalive += "${PN}-config"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050070RCONFLICTS_${PN}-keepalive += "${PN}"
71RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog"