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