# $Id$ PNAME="logrotate" PVER="3.17.0" PBUILD="r1" PCAT="app-admin" DESCRIPTION="Rotates, compresses, removes and mails system log files." HOMEPAGE="https://github.com/logrotate/logrotate/" DEPEND=">= virtual/glibc >= virtual/gzip >= dev-libs/popt-1.16" SDEPEND=">= virtual/sed >= dev-libs/popt-dev-1.16" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" ALX_PKG_KEEP="etc usr/sbin/logrotate usr/lib/systemd/system" msetfeature "!check" # some tests will fail due missing deps on alx sminclude mbuild mtools systemd alx-split SRC_URI=( https://github.com/logrotate/${PNAME}/releases/download/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/logrotate.conf-3.7.1 ) UP2DATE="updatecmd https://github.com/logrotate/logrotate/releases | highesttarball xz" src_compile() { cd ${SRCDIR} mconfigure \ --with-compress-command=/usr/bin/gzip \ --with-uncompress-command=/usr/bin/gunzip \ --with-default-mail-command=/usr/bin/mail \ --without-acl \ || die mmake || die } alx_generic_src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # conf minstalletc logrotate.conf-3.7.1 logrotate.conf || die # systemd timer minstalldir $(mget-systemd-unit-dir) || die minstallfile examples/logrotate.timer $(mget-systemd-unit-dir) || die minstallfile examples/logrotate.service $(mget-systemd-unit-dir) || die minstalldir $(mget-systemd-unit-dir)/timers.target.wants || die mlink ../logrotate.timer $(mget-systemd-unit-dir)/timers.target.wants/ || die # mark it undeletable mkeepdir /etc/logrotate.d || die # doc minstalldocs CHANGES COPYING README* examples/* || die } postinstall() { # needed directory if [ ! -d ${MROOT}/etc/logrotate.d ] then install -d ${MROOT}/etc/logrotate.d fi # mark it undeletable touch ${MROOT}/etc/logrotate.d/.keep }