wok-current annotate logrotate/receipt @ rev 25653
lzo needed from fsarchiver
author | Hans-G?nter Theisgen |
---|---|
date | Tue Feb 13 07:22:29 2024 +0100 (6 months ago) |
parents | 5ea0ce1cecc0 |
children |
rev | line source |
---|---|
pascal@3504 | 1 # SliTaz package receipt. |
pascal@3504 | 2 |
pascal@3504 | 3 PACKAGE="logrotate" |
Hans-G?nter@24861 | 4 VERSION="3.19.0" |
pascal@3504 | 5 CATEGORY="system-tools" |
Hans-G?nter@21375 | 6 SHORT_DESC="Automatic rotation, compression, and removal of log files." |
pascal@3504 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
Hans-G?nter@21375 | 9 WEB_SITE="https://github.com/logrotate/logrotate/" |
Hans-G?nter@21375 | 10 |
pascal@3504 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21375 | 12 WGET_URL="${WEB_SITE}releases/download/$VERSION/$TARBALL" |
pascal@13189 | 13 |
pascal@3504 | 14 DEPENDS="popt" |
Hans-G?nter@21375 | 15 BUILD_DEPENDS="automake popt-dev" |
Hans-G?nter@23141 | 16 |
Hans-G?nter@21375 | 17 CONFIG_FILES="/etc/logrotate.conf" |
pascal@3504 | 18 |
pascal@24055 | 19 current_version() |
pascal@24055 | 20 { |
pascal@24055 | 21 wget -O - ${WGET_URL%/down*} 2>/dev/null | \ |
pascal@24055 | 22 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q' |
pascal@24055 | 23 } |
pascal@24055 | 24 |
pascal@3504 | 25 # Rules to configure and make the package. |
pascal@3504 | 26 compile_rules() |
pascal@3504 | 27 { |
Hans-G?nter@21375 | 28 autoreconf -fiv && |
Hans-G?nter@21375 | 29 ./configure \ |
Hans-G?nter@21375 | 30 --prefix=/usr \ |
Hans-G?nter@21375 | 31 --mandir=/usr/share/man \ |
Hans-G?nter@21375 | 32 $CONFIGURE_ARGS && |
Hans-G?nter@24861 | 33 make && |
Hans-G?nter@24861 | 34 make install PREFIX=$DESTDIR |
pascal@3504 | 35 } |
pascal@3504 | 36 |
pascal@3504 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@3504 | 38 genpkg_rules() |
pascal@3504 | 39 { |
Hans-G?nter@21375 | 40 mkdir -p $fs/etc |
Hans-G?nter@21375 | 41 |
Hans-G?nter@24861 | 42 echo -e "#Logrotate configuration file\n\ninclude /etc/logrotate.d" \ |
Hans-G?nter@24861 | 43 > $fs/etc/logrotate.conf |
Hans-G?nter@24861 | 44 cook_copy_folders sbin |
pascal@3504 | 45 } |
pascal@3504 | 46 |
erjo@12213 | 47 post_install() |
erjo@12213 | 48 { |
Hans-G?nter@23141 | 49 if [ -f "$1/var/spool/cron/crontabs/root" ] |
Hans-G?nter@23141 | 50 then |
Hans-G?nter@24861 | 51 echo "Creating crontab entry..." |
erjo@12213 | 52 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \ |
pascal@18730 | 53 >> "$1/var/spool/cron/crontabs/root" |
erjo@12213 | 54 fi |
erjo@12213 | 55 } |
erjo@12213 | 56 |
erjo@12213 | 57 |
erjo@12213 | 58 post_remove() |
erjo@12213 | 59 { |
Hans-G?nter@23141 | 60 if [ -f "$1/var/spool/cron/crontabs/root" ] |
Hans-G?nter@23141 | 61 then |
Hans-G?nter@24861 | 62 echo "Removing crontab entry..." |
pascal@18730 | 63 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root" |
erjo@12213 | 64 fi |
erjo@12213 | 65 } |