wok-current view logrotate/receipt @ rev 24996
updated nim (0.19.6 -> 1.6.6)
author | Hans-G?nter Theisgen |
---|---|
date | Mon May 16 10:46:30 2022 +0100 (2022-05-16) |
parents | 5ea0ce1cecc0 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.19.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Automatic rotation, compression, and removal of log files."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://github.com/logrotate/logrotate/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}releases/download/$VERSION/$TARBALL"
14 DEPENDS="popt"
15 BUILD_DEPENDS="automake popt-dev"
17 CONFIG_FILES="/etc/logrotate.conf"
19 current_version()
20 {
21 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 autoreconf -fiv &&
29 ./configure \
30 --prefix=/usr \
31 --mandir=/usr/share/man \
32 $CONFIGURE_ARGS &&
33 make &&
34 make install PREFIX=$DESTDIR
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/etc
42 echo -e "#Logrotate configuration file\n\ninclude /etc/logrotate.d" \
43 > $fs/etc/logrotate.conf
44 cook_copy_folders sbin
45 }
47 post_install()
48 {
49 if [ -f "$1/var/spool/cron/crontabs/root" ]
50 then
51 echo "Creating crontab entry..."
52 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
53 >> "$1/var/spool/cron/crontabs/root"
54 fi
55 }
58 post_remove()
59 {
60 if [ -f "$1/var/spool/cron/crontabs/root" ]
61 then
62 echo "Removing crontab entry..."
63 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
64 fi
65 }