Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | SUMMARY = "Software watchdog" |
| 2 | DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ |
| 3 | working. If programs in user space are not longer executed \ |
| 4 | it will reboot the system." |
| 5 | HOMEPAGE = "http://watchdog.sourceforge.net/" |
| 6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" |
| 7 | |
| 8 | LICENSE = "GPL-2.0+" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" |
| 10 | |
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ |
| 12 | file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 14 | file://watchdog-init.patch \ |
| 15 | file://watchdog-conf.patch \ |
| 16 | file://wd_keepalive.init \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828" |
| 20 | SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c" |
| 21 | |
| 22 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/" |
| 23 | UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/" |
| 24 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 25 | inherit autotools update-rc.d systemd |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 26 | |
| 27 | DEPENDS_append_libc-musl = " libtirpc " |
| 28 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " |
| 29 | LDFLAGS_append_libc-musl = " -ltirpc " |
| 30 | EXTRA_OECONF_append_libc-musl = " --disable-nfs " |
| 31 | |
| 32 | INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" |
| 33 | |
| 34 | INITSCRIPT_NAME_${PN} = "watchdog.sh" |
| 35 | INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ." |
| 36 | |
| 37 | INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" |
| 38 | INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." |
| 39 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 40 | SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive" |
| 41 | SYSTEMD_SERVICE_${PN} = "watchdog.service" |
| 42 | SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 43 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 44 | do_install_append() { |
| 45 | install -d ${D}${systemd_system_unitdir} |
| 46 | install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir} |
| 47 | install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir} |
| 48 | |
| 49 | install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh |
| 50 | install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive |
| 51 | |
| 52 | # watchdog.conf is provided by the watchdog-config recipe |
| 53 | rm ${D}${sysconfdir}/watchdog.conf |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | PACKAGES =+ "${PN}-keepalive" |
| 57 | |
| 58 | FILES_${PN}-keepalive = " \ |
| 59 | ${sysconfdir}/init.d/wd_keepalive \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 60 | ${systemd_system_unitdir}/wd_keepalive.service \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 61 | ${sbindir}/wd_keepalive \ |
| 62 | " |
| 63 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 64 | RDEPENDS_${PN} += "${PN}-config" |
| 65 | RRECOMMENDS_${PN} += "kernel-module-softdog" |
| 66 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 67 | RDEPENDS_${PN}-keepalive += "${PN}-config" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 68 | RCONFLICTS_${PN}-keepalive += "${PN}" |
| 69 | RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog" |