wok-6.x annotate logrotate/receipt @ rev 12213
up: logrotate(3.8.1) + improve package"
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Apr 01 12:41:48 2012 +0200 (2012-04-01) |
parents | 73b5177e96e3 |
children | 90bf9e9c31ca |
rev | line source |
---|---|
pascal@3504 | 1 # SliTaz package receipt. |
pascal@3504 | 2 |
pascal@3504 | 3 PACKAGE="logrotate" |
erjo@12213 | 4 VERSION="3.8.1" |
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/" |
pascal@3504 | 10 WGET_URL="http://www.sfr-fresh.com/unix/privat/$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 |
pascal@3504 | 19 make && make PREFIX=$src/_pkg 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 |
pascal@3504 | 28 cp -a $_pkg/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 { |
erjo@12213 | 43 if [ -f /var/spool/cron/crontabs/root ]; then |
erjo@12213 | 44 echo "Runing post install command..." |
erjo@12213 | 45 sed -i s!.*logrotate.*!! /var/spool/cron/crontabs/root |
erjo@12213 | 46 fi |
erjo@12213 | 47 } |
erjo@12213 | 48 |