rendered paste bodyDESCRIPTION = "Rotates, compresses, removes and mails system log files"
HOMEPAGE = "http://packages.debian.org/unstable/admin/logrotate"
MAINTAINER = "Colin T. Hill <hillct@pinnacledigital.com>"
RCONFLICTS += "logrotate-script"
DEPENDS += "popt install-native"
RDEPENDS += "cron"
SECTION = "admin"
LICENSE = "GPL"
SRC_URI = "http://ftp.debian.org/debian/pool/main/l/logrotate/logrotate_${PV}.orig.tar.gz \
file://logrotate.conf"
inherit autotools
CFLAGS_prepend += "-I${STAGING_INCDIR} "
EXTRA_OEMAKE += "-L${STAGING_LIBDIR}"
do_install_append () {
# Install the binary and conf file
# install -m 0755 ${WORKDIR}/logrotate ${D}${sbindir}/logrotate
install -m 0644 ${WORKDIR}/logrotate.conf ${D}${sysconfdir}/logrotate.conf
}
pkg_postinst () {
# Add the logrotate line to /etc/crontab
grep -q "/sbin/logrotate" ${sysconfdir}/crontab || echo "*/5 * * * * /sbin/logrotate" >> ${sysconfdir}/crontab
}
pkg_postrm() {
# Remove the logrotate line from /etc/crontab
grep -v "/sbin/logrotate" > ${sysconfdir}/crontab
}
# End of logrotate_3.7.1.bb