# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
github.setup logrotate logrotate 3.15.0
github.tarball_from releases
checksums rmd160 8a2a190a1e4240575d038f5400d08d1550a7fcbf \
sha256 313612c4776a305393454c874ef590d8acf84c9ffa648717731dfe902284ff8f \
maintainers {ctreleaven @ctreleaven} openmaintainer
description Rotates, compresses, and mails system logs
long_description The logrotate utility is designed to simplify the administration of logs \
on a system which generates a lot of log files. Logrotate provides \
automatic rotation, compression (gzip by default), removal and mailing \
of log files. Logrotate can be set to handle a log file daily, weekly, \
monthly or when the log file exceeds a certain size.
depends_run port:gettext \
set compress ${prefix}/bin/gzip
set uncompress ${prefix}/bin/gunzip
touch ${worksrcpath}/.depend
copy ${filespath}/logrotate.conf.example \
copy ${filespath}/org.macports.logrotate.plist.example \
patchfiles patch-logrotate.c.diff
reinplace "s|@PREFIX@|${prefix}|g" \
${worksrcpath}/examples/logrotate.conf
reinplace "s|@PREFIX@|${prefix}|g" \
${worksrcpath}/logrotate.conf.example
reinplace "s|@PREFIX@|${prefix}|g" \
${worksrcpath}/org.macports.logrotate.plist.example
--with-state-file-path=${prefix}/var/run/logrotate/logrotate.status \
--with-default-mail-command=/bin/mail \
--with-compress-command=${compress} \
--with-uncompress-command=${uncompress} \
--with-compress-extension=${compress_ext}
destroot.keepdirs ${destroot}${prefix}/etc/logrotate.d \
${destroot}${prefix}/var/run/logrotate
xinstall -d ${destroot}${prefix}/share/${name}
xinstall -m 644 -W ${worksrcpath} ChangeLog.md COPYING \
logrotate.conf.example org.macports.logrotate.plist.example \
${destroot}${prefix}/share/${name}
if {[variant_isset startupitem]
&& ${startupitem.install} != "no"
xinstall -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.logrotate
xinstall -d ${destroot}/Library/LaunchDaemons
xinstall -m 644 ${destroot}${prefix}/share/${name}/org.macports.logrotate.plist.example \
${destroot}${prefix}/etc/LaunchDaemons/org.macports.logrotate/org.macports.logrotate.plist
ln -sf "${prefix}/etc/LaunchDaemons/org.macports.logrotate/org.macports.logrotate.plist" "${destroot}/Library/LaunchDaemons/org.macports.logrotate.plist"
if ![file exists ${prefix}/etc/logrotate.conf] {