1SUMMARY = "A log file analysis program" 2DESCRIPTION = "\ 3Logwatch is a customizable, pluggable log-monitoring system. It will go \ 4through your logs for a given period of time and make a report in the areas \ 5that you wish with the detail that you wish. Easy to use - works right out of \ 6the package on many systems.\ 7" 8SECTION = "devel" 9HOMEPAGE = "http://www.logwatch.org/" 10LICENSE = "MIT" 11LIC_FILES_CHKSUM = "file://LICENSE;md5=ba882fa9b4b6b217a51780be3f4db9c8" 12RDEPENDS:${PN} = "perl" 13 14SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz" 15SRC_URI[sha256sum] = "689f3c68b99ef7af7d3c7007c3ff0a55d5674bdbf9c01f69a9f187726d6d4baf" 16 17do_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 46EOF 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} 58