blob: 873ac2b10535d790b1ad324a97b0df148b791657 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "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] = "7b50d10da6f185228627c55fdd51f624"
18SRC_URI[sha256sum] = "06294c092b2115eca3d054c57778718c91dd2e0fd1c46650b7343c2a92672ca9"
19
20inherit useradd
21
22USERADD_PACKAGES = "${PN}"
23USERADD_PARAM_${PN} = "-m -g ${BPN} -G adm -r -d ${localstatedir}/lib/${BPN} \
24 -s /bin/false -c 'logcheck account' ${BPN}"
25GROUPADD_PARAM_${PN} = "-r ${BPN}"
26
27do_install() {
28 # Fix QA Issue
29 sed -i '/install -d $(DESTDIR)\/var\/lock\/logcheck/s/^/#/' Makefile
30
31 # "make install" do not install the manpages. Install them manually.
32 install -m 755 -d ${D}${mandir}/man1
33 install -m 755 -d ${D}${mandir}/man8
34 install -m 644 docs/logcheck-test.1 ${D}${mandir}/man1/
35 install -m 644 docs/logtail.8 ${D}${mandir}/man8/
36 install -m 644 docs/logtail2.8 ${D}${mandir}/man8/
37
38 install -m 755 -d ${D}${sysconfdir}/cron.d
39 install -m 644 debian/logcheck.cron.d ${D}${sysconfdir}/cron.d/logcheck
40 install -m 755 -d ${D}/var/lib/logcheck
41
42 oe_runmake install DESTDIR=${D}
43
44 # install header.txt for generated mails
45 install -m 0644 ${S}/debian/header.txt ${D}${sysconfdir}/${BPN}
46
47 chown -R ${BPN}:${BPN} ${D}${localstatedir}/lib/${BPN}
48 chown -R root:${BPN} ${D}${sysconfdir}/${BPN}
49
50 # Don't install /var/lock when populating rootfs. Do it through volatile
51 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
52 install -d ${D}${sysconfdir}/default/volatiles
53 install -m 0644 ${WORKDIR}/99_logcheck ${D}${sysconfdir}/default/volatiles
54 fi
55 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
56 install -d ${D}${sysconfdir}/tmpfiles.d
57 echo "d /var/lock/logcheck 0755 logcheck logcheck -" \
58 > ${D}${sysconfdir}/tmpfiles.d/logcheck.conf
59 fi
60}
61
62VIRTUAL-RUNTIME_syslog ??= "rsyslog"
63
64RDEPENDS_${PN} = "\
65 bash \
66 cronie \
67 debianutils-run-parts \
68 grep \
69 lockfile-progs \
70 mime-construct \
71 perl \
72 perl-module-file-basename \
73 perl-module-getopt-std \
74 perl-module-file-glob \
75 ${VIRTUAL-RUNTIME_syslog} \
76"
77
78FILES_${PN} += "${datadir}/logtail"