# $Id$ PNAME="logrotate" PVER="3.9.1" PBUILD="r1" PCAT="app-admin" DESCRIPTION="Rotates, compresses, removes and mails system log files." HOMEPAGE="http://download.fedora.redhat.com/pub/fedora/linux/core/3/SRPMS/" DEPEND=">= virtual/glibc >= 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" sminclude mtools alx-split SRC_URI=( https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/logrotate.conf-3.7.1 mirror://${PNAME}/logrotate.cron-3.7.1 mirror://${PNAME}/${PNAME}-3.7.7-datehack.patch mirror://${PNAME}/${PNAME}-3.7.7-weekly.patch ) UP2DATE="updatecmd https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/ | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch ${PNAME}-3.7.7-datehack.patch || die mpatch ${PNAME}-3.7.7-weekly.patch || die # fix a small glitch in the man pages sed -i "s:logrotate/status:logrotate.status:" logrotate.8 || die } src_compile() { cd ${SRCDIR} mmake RPM_OPT_FLAGS="${CFLAGS}" || die } alx_generic_src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/sbin || die # bins minstallexec logrotate /usr/sbin || die # conf minstalletc logrotate.conf-3.7.1 logrotate.conf || die # cron minstallcron daily logrotate.cron-3.7.1 logrotate || die # man minstallman logrotate.8 || 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 }