wok view logrotate/receipt @ rev 23943

Up cryptsetup-dev (2.3.4), lzham_codec (1_0_stable1), slitaz-boot-scripts (466), tazlito (527)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 17 10:31:38 2020 +0000 (2020-09-17)
parents 65377becef99
children 5ea0ce1cecc0
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.16.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 # Rules to configure and make the package.
20 compile_rules()
21 {
22 autoreconf -fiv &&
23 ./configure \
24 --prefix=/usr \
25 --mandir=/usr/share/man \
26 $CONFIGURE_ARGS &&
27 make -j 1 &&
28 make PREFIX=$DESTDIR install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr
35 mkdir -p $fs/etc
37 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
38 > $fs/etc/logrotate.conf
39 cp -a $install/usr/sbin $fs/usr
40 }
42 post_install()
43 {
44 if [ -f "$1/var/spool/cron/crontabs/root" ]
45 then
46 echo "Runing post install command..."
47 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
48 >> "$1/var/spool/cron/crontabs/root"
49 fi
50 }
53 post_remove()
54 {
55 if [ -f "$1/var/spool/cron/crontabs/root" ]
56 then
57 echo "Runing post install command..."
58 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
59 fi
60 }