wok view logrotate/receipt @ rev 22699

encfs: fix path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jan 21 10:31:43 2020 +0100 (2020-01-21)
parents 8e449fe1df2e
children 26e2e48007c1
line source
1 # SliTaz package receipt.
3 PACKAGE="logrotate"
4 VERSION="3.15.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"
16 CONFIG_FILES="/etc/logrotate.conf"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 autoreconf -fiv &&
22 ./configure \
23 --prefix=/usr \
24 --mandir=/usr/share/man \
25 $CONFIGURE_ARGS &&
26 make -j 1 &&
27 make PREFIX=$DESTDIR install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr
34 mkdir -p $fs/etc
36 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
37 > $fs/etc/logrotate.conf
38 cp -a $install/usr/sbin $fs/usr
39 }
41 post_install()
42 {
43 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
44 echo "Runing post install command..."
45 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
46 >> "$1/var/spool/cron/crontabs/root"
47 fi
48 }
51 post_remove()
52 {
53 if [ -f "$1/var/spool/cron/crontabs/root" ]; then
54 echo "Runing post install command..."
55 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
56 fi
57 }