Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Analyzes log files and sends noticeable events as email" |
| 2 | DESCRIPTION = "\ |
| 3 | Logcheck is a simple utility which is designed to allow a system administrator \ |
| 4 | to view the log-files which are produced upon hosts under their control. \ |
| 5 | It does this by mailing summaries of the log-files to them, after first \ |
| 6 | filtering out "normal" entries. \ |
| 7 | Normal entries are entries which match one of the many included regular \ |
| 8 | expression files contain in the database." |
| 9 | SECTION = "Applications/System" |
| 10 | HOMEPAGE = "http://logcheck.org/" |
| 11 | LICENSE = "GPLv2" |
| 12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c93c0550bd3173f4504b2cbd8991e50b" |
| 13 | |
| 14 | SRC_URI = "${DEBIAN_MIRROR}/main/l/${BPN}/${BPN}_${PV}.tar.xz \ |
| 15 | file://99_logcheck \ |
| 16 | " |
| 17 | SRC_URI[md5sum] = "1c6e9a97f9cc485353c25147cb99fb25" |
| 18 | SRC_URI[sha256sum] = "9fb6d02b933470d0b1d1efb54ea186e0d0d27336f9d146be592f65ce60dfb3e6" |
| 19 | |
| 20 | S = "${WORKDIR}/${BPN}" |
| 21 | |
| 22 | inherit useradd |
| 23 | |
| 24 | USERADD_PACKAGES = "${PN}" |
| 25 | USERADD_PARAM_${PN} = "-m -g ${BPN} -G adm -r -d ${localstatedir}/lib/${BPN} \ |
| 26 | -s /bin/false -c 'logcheck account' ${BPN}" |
| 27 | GROUPADD_PARAM_${PN} = "-r ${BPN}" |
| 28 | |
| 29 | do_install() { |
| 30 | # Fix QA Issue |
| 31 | sed -i '/install -d $(DESTDIR)\/var\/lock\/logcheck/s/^/#/' Makefile |
| 32 | |
| 33 | # "make install" do not install the manpages. Install them manually. |
| 34 | install -m 755 -d ${D}${mandir}/man1 |
| 35 | install -m 755 -d ${D}${mandir}/man8 |
| 36 | install -m 644 docs/logcheck-test.1 ${D}${mandir}/man1/ |
| 37 | install -m 644 docs/logtail.8 ${D}${mandir}/man8/ |
| 38 | install -m 644 docs/logtail2.8 ${D}${mandir}/man8/ |
| 39 | |
| 40 | install -m 755 -d ${D}${sysconfdir}/cron.d |
| 41 | install -m 644 debian/logcheck.cron.d ${D}${sysconfdir}/cron.d/logcheck |
| 42 | install -m 755 -d ${D}/var/lib/logcheck |
| 43 | |
| 44 | oe_runmake install DESTDIR=${D} |
| 45 | |
| 46 | # install header.txt for generated mails |
| 47 | install -m 0644 ${S}/debian/header.txt ${D}${sysconfdir}/${BPN} |
| 48 | |
| 49 | chown -R ${BPN}:${BPN} ${D}${localstatedir}/lib/${BPN} |
| 50 | chown -R root:${BPN} ${D}${sysconfdir}/${BPN} |
| 51 | |
| 52 | # Don't install /var/lock when populating rootfs. Do it through volatile |
| 53 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 54 | install -d ${D}${sysconfdir}/default/volatiles |
| 55 | install -m 0644 ${WORKDIR}/99_logcheck ${D}${sysconfdir}/default/volatiles |
| 56 | fi |
| 57 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 58 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 59 | echo "d /var/lock/logcheck 0755 logcheck logcheck -" \ |
| 60 | > ${D}${sysconfdir}/tmpfiles.d/logcheck.conf |
| 61 | fi |
| 62 | } |
| 63 | |
| 64 | VIRTUAL-RUNTIME_syslog ??= "rsyslog" |
| 65 | |
| 66 | RDEPENDS_${PN} = "\ |
| 67 | bash \ |
| 68 | cronie \ |
| 69 | debianutils-run-parts \ |
| 70 | grep \ |
| 71 | lockfile-progs \ |
| 72 | mime-construct \ |
| 73 | perl \ |
| 74 | perl-module-file-basename \ |
| 75 | perl-module-getopt-std \ |
| 76 | perl-module-file-glob \ |
| 77 | ${VIRTUAL-RUNTIME_syslog} \ |
| 78 | " |
| 79 | |
| 80 | FILES_${PN} += "${datadir}/logtail" |