wok annotate logrotate/receipt @ rev 25669
Up lapack (3.12.0), less (633), libarchive (3.7.2), liblouis (3.28.0), libmicrohttpd (1.0.1), libpng (1.6.43), libssh (0.10.6), libtasn1 (4.19.0), libtirpc (1.3.4), libvpx (1.14.0), libwebp (1.3.2), logrotate (3.21.0), lua (5.4.6)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 25 16:11:20 2024 +0000 (3 months ago) |
parents | 7364ffdaaa60 |
children |
rev | line source |
---|---|
pascal@3504 | 1 # SliTaz package receipt. |
pascal@3504 | 2 |
pascal@3504 | 3 PACKAGE="logrotate" |
pascal@25669 | 4 VERSION="3.21.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@25600 | 19 # What is the latest version available today? |
pascal@24055 | 20 current_version() |
pascal@24055 | 21 { |
pascal@24055 | 22 wget -O - ${WGET_URL%/down*} 2>/dev/null | \ |
pascal@25600 | 23 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q' |
pascal@24055 | 24 } |
pascal@24055 | 25 |
pascal@3504 | 26 # Rules to configure and make the package. |
pascal@3504 | 27 compile_rules() |
pascal@3504 | 28 { |
Hans-G?nter@21375 | 29 autoreconf -fiv && |
Hans-G?nter@21375 | 30 ./configure \ |
Hans-G?nter@21375 | 31 --prefix=/usr \ |
Hans-G?nter@21375 | 32 --mandir=/usr/share/man \ |
Hans-G?nter@21375 | 33 $CONFIGURE_ARGS && |
Hans-G?nter@24861 | 34 make && |
Hans-G?nter@24861 | 35 make install PREFIX=$DESTDIR |
pascal@3504 | 36 } |
pascal@3504 | 37 |
pascal@3504 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@3504 | 39 genpkg_rules() |
pascal@3504 | 40 { |
Hans-G?nter@21375 | 41 mkdir -p $fs/etc |
Hans-G?nter@21375 | 42 |
Hans-G?nter@24861 | 43 echo -e "#Logrotate configuration file\n\ninclude /etc/logrotate.d" \ |
Hans-G?nter@24861 | 44 > $fs/etc/logrotate.conf |
Hans-G?nter@24861 | 45 cook_copy_folders sbin |
pascal@3504 | 46 } |
pascal@3504 | 47 |
erjo@12213 | 48 post_install() |
erjo@12213 | 49 { |
Hans-G?nter@23141 | 50 if [ -f "$1/var/spool/cron/crontabs/root" ] |
Hans-G?nter@23141 | 51 then |
Hans-G?nter@24861 | 52 echo "Creating crontab entry..." |
erjo@12213 | 53 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \ |
pascal@18730 | 54 >> "$1/var/spool/cron/crontabs/root" |
erjo@12213 | 55 fi |
erjo@12213 | 56 } |
erjo@12213 | 57 |
erjo@12213 | 58 |
erjo@12213 | 59 post_remove() |
erjo@12213 | 60 { |
Hans-G?nter@23141 | 61 if [ -f "$1/var/spool/cron/crontabs/root" ] |
Hans-G?nter@23141 | 62 then |
Hans-G?nter@24861 | 63 echo "Removing crontab entry..." |
pascal@18730 | 64 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root" |
erjo@12213 | 65 fi |
erjo@12213 | 66 } |