blob: 069d9f81cadf8899675590a67b0b9e9417caa675 [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 Geissler69721092021-07-23 12:57:00 -040018SRC_URI[sha256sum] = "9fc6287fd9570b25a85c5d5bf988ee8bd4c54d0e9e01ff04cc4b9398a159849c"
Andrew Geissler82c905d2020-04-13 13:39:40 -050019
20DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt"
21
22inherit autotools-brokensep systemd update-rc.d
23
24PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
25PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
26
27EXTRA_OECONF = "\
28 libmonit_cv_setjmp_available=no \
29 libmonit_cv_vsnprintf_c99_conformant=no \
30 --with-ssl-lib-dir=${STAGING_LIBDIR} \
31 --with-ssl-incl-dir=${STAGING_INCDIR} \
32"
33
34SYSTEMD_SERVICE_${PN} = "monit.service"
35SYSTEMD_AUTO_ENABLE = "enable"
36
37INITSCRIPT_PACKAGES = "${PN}"
38INITSCRIPT_NAME_${PN} = "monit"
39INITSCRIPT_PARAMS_${PN} = "defaults 89"
40
41do_install_append() {
42
43 # Configuration file
44 install -Dm 0600 ${WORKDIR}/monitrc ${D}${sysconfdir}/monitrc
45
46 # SystemD
47 install -Dm 0644 ${S}/system/startup/monit.service.in ${D}${systemd_system_unitdir}/monit.service
48 sed -i -e 's,@prefix@,${exec_prefix},g' ${D}${systemd_unitdir}/system/monit.service
49
50 # SysV
51 install -Dm 0755 ${WORKDIR}/monit ${D}${sysconfdir}/init.d/monit
52}