blob: aea539ef0cc13bca3103641ff4348deea60d8d86 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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=f2566bb12b16d2d80d90ebc533261aa7"
12RDEPENDS_${PN} = "perl"
13
14SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz"
Patrick Williamsddad1a12017-02-23 20:36:32 -060015SRC_URI[md5sum] = "22bd22841caa45f12c605abc3e0c2b09"
16SRC_URI[sha256sum] = "1dbdc48d65e150f2dbb43f1e4f4700d94166e053b1c7bbbdedf4ad670283720e"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050017
18do_install() {
19 install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts
20 install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles
21 install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services
22 install -m 0755 -d ${D}${localstatedir}/cache/logwatch
23 mv conf/ ${D}${datadir}/logwatch/default.conf
24 mv scripts/ ${D}${datadir}/logwatch/scripts
25 mv lib ${D}${datadir}/logwatch/lib
26 chown -R root:root ${D}${datadir}/logwatch
27
28 install -m 0755 -d ${D}${mandir}/man1
29 install -m 0755 -d ${D}${mandir}/man5
30 install -m 0755 -d ${D}${mandir}/man8
31 install -m 0644 amavis-logwatch.1 ${D}${mandir}/man1
32 install -m 0644 postfix-logwatch.1 ${D}${mandir}/man1
33 install -m 0644 ignore.conf.5 ${D}${mandir}/man5
34 install -m 0644 override.conf.5 ${D}${mandir}/man5
35 install -m 0644 logwatch.conf.5 ${D}${mandir}/man5
36 install -m 0644 logwatch.8 ${D}${mandir}/man8
37
38 install -m 0755 -d ${D}${sysconfdir}/cron.daily
39 install -m 0755 -d ${D}${sbindir}
40 ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sbindir}/logwatch
41 cat > ${D}${sysconfdir}/cron.daily/0logwatch <<EOF
42 DailyReport=\`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"\`
43 if [ "\$DailyReport" != "No" ] && [ "\$DailyReport" != "no" ]
44 then
45 logwatch
46 fi
47EOF
48 chmod 755 ${D}${sysconfdir}/cron.daily/0logwatch
49
50 install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/logfiles
51 install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/services
52 touch ${D}${sysconfdir}/logwatch/conf/logwatch.conf
53 touch ${D}${sysconfdir}/logwatch/conf/ignore.conf
54 touch ${D}${sysconfdir}/logwatch/conf/override.conf
55 echo "# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)" > ${D}${sysconfdir}/logwatch/conf/logwatch.conf
56 echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > ${D}${sysconfdir}/logwatch/conf/ignore.conf
57 echo "# Configuration overrides for specific logfiles/services may be placed here." > ${D}${sysconfdir}/logwatch/conf/override.conf
58}