SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "logrotate"

# SliTaz package receipt.

PACKAGE="logrotate"
VERSION="3.8.1"
CATEGORY="system-tools"
SHORT_DESC="Automatic rotation compression, removal of log files."
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://fedorahosted.org/logrotate/"
WGET_URL="http://www.sfr-fresh.com/unix/privat/$TARBALL"
DEPENDS="popt"
BUILD_DEPENDS="popt-dev"
CONFIG_FILE="/etc/logrotate.conf"

# Rules to configure and make the package.
compile_rules()
{
    cd $src
    make && make PREFIX=$src/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr $fs/etc
    echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
      > $fs/etc/logrotate.conf
    cp -a $_pkg/usr/sbin $fs/usr
}

post_install()
{
    if [ -f $1/var/spool/cron/crontabs/root ]; then
        echo "Runing post install command..."
        echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
               >> $1/var/spool/cron/crontabs/root
    fi
}


post_remove()
{
    if [ -f /var/spool/cron/crontabs/root ]; then
        echo "Runing post install command..."
        sed -i s!.*logrotate.*!!  /var/spool/cron/crontabs/root
    fi
}
        
3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)