wok-current annotate logrotate/receipt @ rev 13188
Up: logrotate to 3.8.2.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Aug 03 10:02:57 2012 +0000 (2012-08-03) |
parents | 2dde678153c7 |
children | 1a2778defe0c |
rev | line source |
---|---|
pascal@3504 | 1 # SliTaz package receipt. |
pascal@3504 | 2 |
pascal@3504 | 3 PACKAGE="logrotate" |
slaxemulator@13188 | 4 VERSION="3.8.2" |
pascal@3504 | 5 CATEGORY="system-tools" |
pascal@3504 | 6 SHORT_DESC="Automatic rotation compression, removal of log files." |
pascal@3504 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@3504 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@3504 | 9 WEB_SITE="https://fedorahosted.org/logrotate/" |
slaxemulator@13188 | 10 WGET_URL="https://fedorahosted.org/releases/l/o/logrotate/$TARBALL" |
pascal@3504 | 11 DEPENDS="popt" |
pascal@3504 | 12 BUILD_DEPENDS="popt-dev" |
pascal@3504 | 13 CONFIG_FILE="/etc/logrotate.conf" |
pascal@3504 | 14 |
pascal@3504 | 15 # Rules to configure and make the package. |
pascal@3504 | 16 compile_rules() |
pascal@3504 | 17 { |
pascal@3504 | 18 cd $src |
slaxemulator@13188 | 19 make && make PREFIX=$DESTDIR install |
pascal@3504 | 20 } |
pascal@3504 | 21 |
pascal@3504 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@3504 | 23 genpkg_rules() |
pascal@3504 | 24 { |
pascal@3504 | 25 mkdir -p $fs/usr $fs/etc |
erjo@12213 | 26 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \ |
erjo@12213 | 27 > $fs/etc/logrotate.conf |
slaxemulator@13188 | 28 cp -a $install/usr/sbin $fs/usr |
pascal@3504 | 29 } |
pascal@3504 | 30 |
erjo@12213 | 31 post_install() |
erjo@12213 | 32 { |
erjo@12213 | 33 if [ -f $1/var/spool/cron/crontabs/root ]; then |
erjo@12213 | 34 echo "Runing post install command..." |
erjo@12213 | 35 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \ |
erjo@12213 | 36 >> $1/var/spool/cron/crontabs/root |
erjo@12213 | 37 fi |
erjo@12213 | 38 } |
erjo@12213 | 39 |
erjo@12213 | 40 |
erjo@12213 | 41 post_remove() |
erjo@12213 | 42 { |
slaxemulator@13188 | 43 if [ -f $1/var/spool/cron/crontabs/root ]; then |
erjo@12213 | 44 echo "Runing post install command..." |
slaxemulator@13188 | 45 sed -i s!.*logrotate.*!! $1/var/spool/cron/crontabs/root |
erjo@12213 | 46 fi |
erjo@12213 | 47 } |
erjo@12213 | 48 |