wok view logrotate/receipt @ rev 25600
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 16 15:14:43 2023 +0000 (16 months ago) |
parents | e8372db7c74f |
children | 7a8b9cd09212 |
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 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
23 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 autoreconf -fiv &&
30 ./configure \
31 --prefix=/usr \
32 --mandir=/usr/share/man \
33 $CONFIGURE_ARGS &&
34 make &&
35 make install PREFIX=$DESTDIR
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/etc
43 echo -e "#Logrotate configuration file\n\ninclude /etc/logrotate.d" \
44 > $fs/etc/logrotate.conf
45 cook_copy_folders sbin
46 }
48 post_install()
49 {
50 if [ -f "$1/var/spool/cron/crontabs/root" ]
51 then
52 echo "Creating crontab entry..."
53 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
54 >> "$1/var/spool/cron/crontabs/root"
55 fi
56 }
59 post_remove()
60 {
61 if [ -f "$1/var/spool/cron/crontabs/root" ]
62 then
63 echo "Removing crontab entry..."
64 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
65 fi
66 }