wok-6.x view logrotate/receipt @ rev 20833
Add purple-facebook
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Tue Feb 19 13:08:30 2019 -0500 (2019-02-19) |
parents | e8c84b81fa04 |
children | 65377becef99 |
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_FILES="/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 }