logwatch_7.5.3.bb 2.9 KB

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