blob: a954682d6b5177cc3959dfbdb833cdd9e5f49d8c [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
18SRC_URI[md5sum] = "9f7dc65e902c103e4c5891354994c3df"
19SRC_URI[sha256sum] = "87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2"
20
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}