Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | DESCRIPTION = "Monit is a free open source utility for managing and monitoring, \ |
| 2 | processes, programs, files, directories and filesystems on a UNIX system. \ |
| 3 | Monit conducts automatic maintenance and repair and can execute meaningful \ |
| 4 | causal actions in error situations." |
| 5 | |
| 6 | HOMEPAGE = "http://mmonit.com/monit/" |
| 7 | |
| 8 | LICENSE = "AGPL-3.0" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51 \ |
| 10 | file://libmonit/COPYING;md5=2405f1c59ed1bf3714cebdb40162ce92" |
| 11 | |
| 12 | SRC_URI = " \ |
| 13 | https://mmonit.com/monit/dist/monit-${PV}.tar.gz \ |
| 14 | file://monit \ |
| 15 | file://monitrc \ |
| 16 | " |
| 17 | |
| 18 | SRC_URI[sha256sum] = "e85649dfa8586f4fcdd34a0295c55ddd69b0eda6cfbdac47105a2673d10b1008" |
| 19 | |
| 20 | DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt" |
| 21 | |
| 22 | inherit autotools-brokensep systemd update-rc.d |
| 23 | |
| 24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
| 25 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" |
| 26 | |
| 27 | EXTRA_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 | |
| 34 | SYSTEMD_SERVICE:${PN} = "monit.service" |
| 35 | SYSTEMD_AUTO_ENABLE = "enable" |
| 36 | |
| 37 | INITSCRIPT_PACKAGES = "${PN}" |
| 38 | INITSCRIPT_NAME:${PN} = "monit" |
| 39 | INITSCRIPT_PARAMS:${PN} = "defaults 89" |
| 40 | |
| 41 | do_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 | } |