wok view logrotate/receipt @ rev 25669

Up lapack (3.12.0), less (633), libarchive (3.7.2), liblouis (3.28.0), libmicrohttpd (1.0.1), libpng (1.6.43), libssh (0.10.6), libtasn1 (4.19.0), libtirpc (1.3.4), libvpx (1.14.0), libwebp (1.3.2), logrotate (3.21.0), lua (5.4.6)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 25 16:11:20 2024 +0000 (2 months ago)
parents 7364ffdaaa60
children
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.21.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 }