wok view logrotate/receipt @ rev 24142

linux-aufs: git checkout problem ?
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 15 08:46:59 2021 +0000 (2021-11-15)
parents 26e2e48007c1
children e8372db7c74f
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 current_version()
20 {
21 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 autoreconf -fiv &&
29 ./configure \
30 --prefix=/usr \
31 --mandir=/usr/share/man \
32 $CONFIGURE_ARGS &&
33 make -j 1 &&
34 make PREFIX=$DESTDIR install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr
41 mkdir -p $fs/etc
43 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
44 > $fs/etc/logrotate.conf
45 cp -a $install/usr/sbin $fs/usr
46 }
48 post_install()
49 {
50 if [ -f "$1/var/spool/cron/crontabs/root" ]
51 then
52 echo "Runing post install command..."
53 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
54 >> "$1/var/spool/cron/crontabs/root"
55 fi
56 }
59 post_remove()
60 {
61 if [ -f "$1/var/spool/cron/crontabs/root" ]
62 then
63 echo "Runing post install command..."
64 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
65 fi
66 }