wok view logrotate/receipt @ rev 19622

Up busybox (1.26.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 11 10:36:15 2017 +0100 (2017-01-11)
parents 9e01bc6321ea
children 8e449fe1df2e
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.8.2"
5 CATEGORY="system-tools"
6 SHORT_DESC="Automatic rotation compression, removal of log files."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="https://fedorahosted.org/logrotate/"
11 WGET_URL="https://fedorahosted.org/releases/l/o/logrotate/$TARBALL"
12 CONFIG_FILE="/etc/logrotate.conf"
14 DEPENDS="popt"
15 BUILD_DEPENDS="popt-dev wget"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 make && make PREFIX=$DESTDIR MANDIR=/usr/share/man install
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr $fs/etc
27 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
28 > $fs/etc/logrotate.conf
29 cp -a $install/usr/sbin $fs/usr
30 }
32 post_install()
33 {
34 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
35 echo "Runing post install command..."
36 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
37 >> "$1/var/spool/cron/crontabs/root"
38 fi
39 }
42 post_remove()
43 {
44 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
45 echo "Runing post install command..."
46 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
47 fi
48 }