wok-6.x view logrotate/receipt @ rev 12617
pangomm: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 29 10:18:59 2012 +0200 (2012-04-29) |
parents | 73b5177e96e3 |
children | 90bf9e9c31ca |
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.8.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="Automatic rotation compression, removal of log files."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="https://fedorahosted.org/logrotate/"
10 WGET_URL="http://www.sfr-fresh.com/unix/privat/$TARBALL"
11 DEPENDS="popt"
12 BUILD_DEPENDS="popt-dev"
13 CONFIG_FILE="/etc/logrotate.conf"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 make && make PREFIX=$src/_pkg install
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr $fs/etc
26 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
27 > $fs/etc/logrotate.conf
28 cp -a $_pkg/usr/sbin $fs/usr
29 }
31 post_install()
32 {
33 if [ -f $1/var/spool/cron/crontabs/root ]; then
34 echo "Runing post install command..."
35 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
36 >> $1/var/spool/cron/crontabs/root
37 fi
38 }
41 post_remove()
42 {
43 if [ -f /var/spool/cron/crontabs/root ]; then
44 echo "Runing post install command..."
45 sed -i s!.*logrotate.*!! /var/spool/cron/crontabs/root
46 fi
47 }