wok annotate logrotate/receipt @ rev 15000

Add some GPL2 licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 10 17:00:38 2013 +0000 (2013-08-10)
parents 1a2778defe0c
children 9e01bc6321ea
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@15000 8 LICENSE="GPL2"
pascal@3504 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@3504 10 WEB_SITE="https://fedorahosted.org/logrotate/"
slaxemulator@13188 11 WGET_URL="https://fedorahosted.org/releases/l/o/logrotate/$TARBALL"
pascal@13189 12 CONFIG_FILE="/etc/logrotate.conf"
pascal@13189 13
pascal@3504 14 DEPENDS="popt"
pascal@13189 15 BUILD_DEPENDS="popt-dev wget"
pascal@3504 16
pascal@3504 17 # Rules to configure and make the package.
pascal@3504 18 compile_rules()
pascal@3504 19 {
pascal@3504 20 cd $src
slaxemulator@13188 21 make && make PREFIX=$DESTDIR install
pascal@3504 22 }
pascal@3504 23
pascal@3504 24 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@3504 25 genpkg_rules()
pascal@3504 26 {
pascal@3504 27 mkdir -p $fs/usr $fs/etc
erjo@12213 28 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
erjo@12213 29 > $fs/etc/logrotate.conf
slaxemulator@13188 30 cp -a $install/usr/sbin $fs/usr
pascal@3504 31 }
pascal@3504 32
erjo@12213 33 post_install()
erjo@12213 34 {
erjo@12213 35 if [ -f $1/var/spool/cron/crontabs/root ]; then
erjo@12213 36 echo "Runing post install command..."
erjo@12213 37 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
erjo@12213 38 >> $1/var/spool/cron/crontabs/root
erjo@12213 39 fi
erjo@12213 40 }
erjo@12213 41
erjo@12213 42
erjo@12213 43 post_remove()
erjo@12213 44 {
slaxemulator@13188 45 if [ -f $1/var/spool/cron/crontabs/root ]; then
erjo@12213 46 echo "Runing post install command..."
slaxemulator@13188 47 sed -i s!.*logrotate.*!! $1/var/spool/cron/crontabs/root
erjo@12213 48 fi
erjo@12213 49 }
erjo@12213 50