blob: b5e16d0f97b7c13dfdf2902ff690c6c510c644b5 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001DESCRIPTION = "Monit is a free open source utility for managing and monitoring, \
2processes, programs, files, directories and filesystems on a UNIX system. \
3Monit conducts automatic maintenance and repair and can execute meaningful \
4causal actions in error situations."
5
6HOMEPAGE = "http://mmonit.com/monit/"
7
8LICENSE = "AGPL-3.0"
9LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51 \
10 file://libmonit/COPYING;md5=2405f1c59ed1bf3714cebdb40162ce92"
11
12SRC_URI = " \
13 https://mmonit.com/monit/dist/monit-${PV}.tar.gz \
14 file://monit \
15 file://monitrc \
16"
17
Andrew Geisslereef63862021-01-29 15:58:13 -060018SRC_URI[md5sum] = "13a0804dae18ef08198c3ace72f9dd60"
19SRC_URI[sha256sum] = "d8809c78d5dc1ed7a7ba32a5a55c5114855132cc4da4805f8d3aaf8cf46eaa4c"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020
21DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt"
22
23inherit autotools-brokensep systemd update-rc.d
24
25PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
26PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
27
28EXTRA_OECONF = "\
29 libmonit_cv_setjmp_available=no \
30 libmonit_cv_vsnprintf_c99_conformant=no \
31 --with-ssl-lib-dir=${STAGING_LIBDIR} \
32 --with-ssl-incl-dir=${STAGING_INCDIR} \
33"
34
35SYSTEMD_SERVICE_${PN} = "monit.service"
36SYSTEMD_AUTO_ENABLE = "enable"
37
38INITSCRIPT_PACKAGES = "${PN}"
39INITSCRIPT_NAME_${PN} = "monit"
40INITSCRIPT_PARAMS_${PN} = "defaults 89"
41
42do_install_append() {
43
44 # Configuration file
45 install -Dm 0600 ${WORKDIR}/monitrc ${D}${sysconfdir}/monitrc
46
47 # SystemD
48 install -Dm 0644 ${S}/system/startup/monit.service.in ${D}${systemd_system_unitdir}/monit.service
49 sed -i -e 's,@prefix@,${exec_prefix},g' ${D}${systemd_unitdir}/system/monit.service
50
51 # SysV
52 install -Dm 0755 ${WORKDIR}/monit ${D}${sysconfdir}/init.d/monit
53}