wok-next view logrotate/receipt @ rev 21721

created recipes for efivar and efibootmgr
author Hans-G?nter Theisgen
date Tue Sep 01 10:09:15 2020 +0100 (2020-09-01)
parents f48456621a9d
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="logrotate"
4 VERSION="3.11.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Automatic rotation compression, removal of log files"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://github.com/logrotate/logrotate"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/logrotate.html"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://github.com/logrotate/logrotate/releases/download/$VERSION/$TARBALL"
15 BUILD_DEPENDS="popt-dev acl-dev"
17 compile_rules() {
18 sed -i '/exit 5/s/^/echo uncompress failed -- skipping #/' test/test
20 ./configure $CONFIGURE_ARGS &&
21 make &&
22 make install || return 1
24 install -Dm644 $stuff/logrotate.conf $install/etc/logrotate.conf
25 install -Dm644 $stuff/sys.log $install/etc/logrotate.d/sys.log
26 }
28 genpkg_rules() {
29 copy @std
30 DEPENDS="popt"
31 CONFIG_FILES="/etc/logrotate.conf"
32 }
34 post_install() {
35 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
36 cat >> "$1/var/spool/cron/crontabs/root" <<EOT
37 # Run log rotation
38 25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf
39 EOT
40 fi
41 }
43 post_remove() {
44 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
45 sed -i 's!.*logrotate.*!!' "$1/var/spool/cron/crontabs/root"
46 fi
47 }