Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | SUMMARY = "A log file analysis program" |
| 2 | DESCRIPTION = "\ |
| 3 | Logwatch is a customizable, pluggable log-monitoring system. It will go \ |
| 4 | through your logs for a given period of time and make a report in the areas \ |
| 5 | that you wish with the detail that you wish. Easy to use - works right out of \ |
| 6 | the package on many systems.\ |
| 7 | " |
| 8 | SECTION = "devel" |
| 9 | HOMEPAGE = "http://www.logwatch.org/" |
| 10 | LICENSE = "MIT" |
| 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ba882fa9b4b6b217a51780be3f4db9c8" |
| 12 | RDEPENDS:${PN} = "perl" |
| 13 | |
| 14 | SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 15 | SRC_URI[sha256sum] = "49d2f1e99c9770f56fc3e82a46880e8900b874dfba593e45f599c89fd255738e" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 16 | |
| 17 | do_install() { |
| 18 | install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts |
| 19 | install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles |
| 20 | install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services |
| 21 | install -m 0755 -d ${D}${localstatedir}/cache/logwatch |
| 22 | cp -r -f conf/ ${D}${datadir}/logwatch/default.conf |
| 23 | cp -r -f scripts/ ${D}${datadir}/logwatch/scripts |
| 24 | cp -r -f lib ${D}${datadir}/logwatch/lib |
| 25 | chown -R root:root ${D}${datadir}/logwatch |
| 26 | |
| 27 | install -m 0755 -d ${D}${mandir}/man1 |
| 28 | install -m 0755 -d ${D}${mandir}/man5 |
| 29 | install -m 0755 -d ${D}${mandir}/man8 |
| 30 | install -m 0644 amavis-logwatch.1 ${D}${mandir}/man1 |
| 31 | install -m 0644 postfix-logwatch.1 ${D}${mandir}/man1 |
| 32 | install -m 0644 ignore.conf.5 ${D}${mandir}/man5 |
| 33 | install -m 0644 override.conf.5 ${D}${mandir}/man5 |
| 34 | install -m 0644 logwatch.conf.5 ${D}${mandir}/man5 |
| 35 | install -m 0644 logwatch.8 ${D}${mandir}/man8 |
| 36 | |
| 37 | install -m 0755 -d ${D}${sysconfdir}/cron.daily |
| 38 | install -m 0755 -d ${D}${sbindir} |
| 39 | ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sbindir}/logwatch |
| 40 | cat > ${D}${sysconfdir}/cron.daily/0logwatch <<EOF |
| 41 | DailyReport=\`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"\` |
| 42 | if [ "\$DailyReport" != "No" ] && [ "\$DailyReport" != "no" ] |
| 43 | then |
| 44 | logwatch |
| 45 | fi |
| 46 | EOF |
| 47 | chmod 755 ${D}${sysconfdir}/cron.daily/0logwatch |
| 48 | |
| 49 | install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/logfiles |
| 50 | install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/services |
| 51 | touch ${D}${sysconfdir}/logwatch/conf/logwatch.conf |
| 52 | touch ${D}${sysconfdir}/logwatch/conf/ignore.conf |
| 53 | touch ${D}${sysconfdir}/logwatch/conf/override.conf |
| 54 | echo "# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)" > ${D}${sysconfdir}/logwatch/conf/logwatch.conf |
| 55 | echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > ${D}${sysconfdir}/logwatch/conf/ignore.conf |
| 56 | echo "# Configuration overrides for specific logfiles/services may be placed here." > ${D}${sysconfdir}/logwatch/conf/override.conf |
| 57 | } |