wok-next annotate logrotate/receipt @ rev 20849

syslinux: prevent shell expansion, specify CONFIG_FILES
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jun 23 17:39:19 2018 +0300 (2018-06-23)
parents b1a1deb20f42
children f48456621a9d
rev   line source
al@20659 1 # SliTaz package receipt v2.
pascal@3504 2
pascal@3504 3 PACKAGE="logrotate"
al@20659 4 VERSION="3.11.0"
pascal@3504 5 CATEGORY="system-tools"
al@20659 6 SHORT_DESC="Automatic rotation compression, removal of log files"
pascal@3504 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
al@20659 9 WEB_SITE="https://github.com/logrotate/logrotate"
al@20659 10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/general/logrotate.html"
pascal@13189 11
al@20659 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
al@20659 13 WGET_URL="https://github.com/logrotate/logrotate/releases/download/$VERSION/$TARBALL"
al@20659 14
al@20660 15 BUILD_DEPENDS="popt-dev acl-dev"
pascal@3504 16
al@20659 17 compile_rules() {
al@20659 18 sed -i '/exit 5/s/^/echo uncompress failed -- skipping #/' test/test
al@20659 19
al@20659 20 ./configure $CONFIGURE_ARGS &&
al@20659 21 make &&
al@20659 22 make install || return 1
al@20659 23
al@20659 24 install -Dm644 $stuff/logrotate.conf $install/etc/logrotate.conf
al@20659 25 install -Dm644 $stuff/sys.log $install/etc/logrotate.d/sys.log
pascal@3504 26 }
pascal@3504 27
al@20659 28 genpkg_rules() {
al@20659 29 copy @std
al@20659 30 DEPENDS="popt"
al@20659 31 CONFIG_FILE="/etc/logrotate.conf"
pascal@3504 32 }
pascal@3504 33
al@20659 34 post_install() {
pascal@18730 35 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
al@20659 36 cat >> "$1/var/spool/cron/crontabs/root" <<EOT
al@20659 37 # Run log rotation
al@20659 38 25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf
al@20659 39 EOT
erjo@12213 40 fi
erjo@12213 41 }
erjo@12213 42
al@20659 43 post_remove() {
pascal@18730 44 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
al@20659 45 sed -i 's!.*logrotate.*!!' "$1/var/spool/cron/crontabs/root"
erjo@12213 46 fi
erjo@12213 47 }