wok annotate logrotate/receipt @ rev 24259
updated perl-test-simple (1.302172 -> 1.302188)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jan 02 10:10:22 2022 +0100 (2022-01-02) |
parents | 26e2e48007c1 |
children | e8372db7c74f |
rev | line source |
---|---|
pascal@3504 | 1 # SliTaz package receipt. |
pascal@3504 | 2 |
pascal@3504 | 3 PACKAGE="logrotate" |
Hans-G?nter@23141 | 4 VERSION="3.16.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@21375 | 33 make -j 1 && |
Hans-G?nter@21375 | 34 make PREFIX=$DESTDIR install |
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/usr |
Hans-G?nter@21375 | 41 mkdir -p $fs/etc |
Hans-G?nter@21375 | 42 |
erjo@12213 | 43 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \ |
erjo@12213 | 44 > $fs/etc/logrotate.conf |
Hans-G?nter@23141 | 45 cp -a $install/usr/sbin $fs/usr |
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 |
erjo@12213 | 52 echo "Runing post install command..." |
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 |
erjo@12213 | 63 echo "Runing post install command..." |
pascal@18730 | 64 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root" |
erjo@12213 | 65 fi |
erjo@12213 | 66 } |