blob: 1acab2e9e7b56ad4f973ff04a698842bab0ccca2 [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+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
12 file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040013 file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 file://watchdog.init \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015 file://wd_keepalive.init \
16"
17
18SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
19SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c"
20
21UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
22UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
23
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024inherit autotools update-rc.d systemd pkgconfig
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026DEPENDS += "libtirpc"
27CFLAGS += "-I${STAGING_INCDIR}/tirpc"
28LDFLAGS += "-ltirpc"
29
30EXTRA_OECONF += " --disable-nfs "
Patrick Williamsc0f7c042017-02-23 20:41:17 -060031
32INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
33
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034INITSCRIPT_NAME_${PN} = "watchdog"
35INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060036
37INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ."
Patrick Williamsc0f7c042017-02-23 20:41:17 -060039
Brad Bishop316dfdd2018-06-25 12:45:53 -040040SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
41SYSTEMD_SERVICE_${PN} = "watchdog.service"
42SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043# When using systemd, consider making use of internal watchdog support of systemd.
44# See RuntimeWatchdogSec in /etc/systemd/system.conf.
45SYSTEMD_AUTO_ENABLE = "disable"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047do_install_append() {
48 install -d ${D}${systemd_system_unitdir}
49 install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
50 install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}
51
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080052 install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053 install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
54
55 # watchdog.conf is provided by the watchdog-config recipe
56 rm ${D}${sysconfdir}/watchdog.conf
Patrick Williamsc0f7c042017-02-23 20:41:17 -060057}
58
59PACKAGES =+ "${PN}-keepalive"
60
61FILES_${PN}-keepalive = " \
62 ${sysconfdir}/init.d/wd_keepalive \
Brad Bishop316dfdd2018-06-25 12:45:53 -040063 ${systemd_system_unitdir}/wd_keepalive.service \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060064 ${sbindir}/wd_keepalive \
65"
66
Brad Bishop6e60e8b2018-02-01 10:27:11 -050067RDEPENDS_${PN} += "${PN}-config"
68RRECOMMENDS_${PN} += "kernel-module-softdog"
69
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070RDEPENDS_${PN}-keepalive += "${PN}-config"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050071RCONFLICTS_${PN}-keepalive += "${PN}"
72RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog"