Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [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[md5sum] = "9f7dc65e902c103e4c5891354994c3df" |
| 19 | SRC_URI[sha256sum] = "87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2" |
| 20 | |
| 21 | DEPENDS = "zlib bison-native libnsl2 flex-native openssl virtual/crypt" |
| 22 | |
| 23 | inherit autotools-brokensep systemd update-rc.d |
| 24 | |
| 25 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
| 26 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" |
| 27 | |
| 28 | EXTRA_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 | |
| 35 | SYSTEMD_SERVICE_${PN} = "monit.service" |
| 36 | SYSTEMD_AUTO_ENABLE = "enable" |
| 37 | |
| 38 | INITSCRIPT_PACKAGES = "${PN}" |
| 39 | INITSCRIPT_NAME_${PN} = "monit" |
| 40 | INITSCRIPT_PARAMS_${PN} = "defaults 89" |
| 41 | |
| 42 | do_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 | } |