blob: 10b281a66bfb2a50f1dda5b54eed9b1097f6f456 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Analyzes log files and sends noticeable events as email"
2DESCRIPTION = "\
3Logcheck is a simple utility which is designed to allow a system administrator \
4to view the log-files which are produced upon hosts under their control. \
5It does this by mailing summaries of the log-files to them, after first \
6filtering out "normal" entries. \
7Normal entries are entries which match one of the many included regular \
8expression files contain in the database."
9SECTION = "Applications/System"
10HOMEPAGE = "http://logcheck.org/"
11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=c93c0550bd3173f4504b2cbd8991e50b"
13
14SRC_URI = "${DEBIAN_MIRROR}/main/l/${BPN}/${BPN}_${PV}.tar.xz \
15 file://99_logcheck \
16"
17SRC_URI[md5sum] = "1c6e9a97f9cc485353c25147cb99fb25"
18SRC_URI[sha256sum] = "9fb6d02b933470d0b1d1efb54ea186e0d0d27336f9d146be592f65ce60dfb3e6"
19
20S = "${WORKDIR}/${BPN}"
21
22inherit useradd
23
24USERADD_PACKAGES = "${PN}"
25USERADD_PARAM_${PN} = "-m -g ${BPN} -G adm -r -d ${localstatedir}/lib/${BPN} \
26 -s /bin/false -c 'logcheck account' ${BPN}"
27GROUPADD_PARAM_${PN} = "-r ${BPN}"
28
29do_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
64VIRTUAL-RUNTIME_syslog ??= "rsyslog"
65
66RDEPENDS_${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
80FILES_${PN} += "${datadir}/logtail"