wok annotate logrotate/receipt @ rev 23848

inkscape: update build_depends
author Richard Dunbar <mojo@slitaz.org>
date Sun Jun 14 23:18:03 2020 -0400 (2020-06-14)
parents 65377becef99
children 5ea0ce1cecc0
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@3504 19 # Rules to configure and make the package.
pascal@3504 20 compile_rules()
pascal@3504 21 {
Hans-G?nter@21375 22 autoreconf -fiv &&
Hans-G?nter@21375 23 ./configure \
Hans-G?nter@21375 24 --prefix=/usr \
Hans-G?nter@21375 25 --mandir=/usr/share/man \
Hans-G?nter@21375 26 $CONFIGURE_ARGS &&
Hans-G?nter@21375 27 make -j 1 &&
Hans-G?nter@21375 28 make PREFIX=$DESTDIR install
pascal@3504 29 }
pascal@3504 30
pascal@3504 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@3504 32 genpkg_rules()
pascal@3504 33 {
Hans-G?nter@21375 34 mkdir -p $fs/usr
Hans-G?nter@21375 35 mkdir -p $fs/etc
Hans-G?nter@21375 36
erjo@12213 37 echo -e "#Logrotate Config file\n\ninclude /etc/logrotate.d" \
erjo@12213 38 > $fs/etc/logrotate.conf
Hans-G?nter@23141 39 cp -a $install/usr/sbin $fs/usr
pascal@3504 40 }
pascal@3504 41
erjo@12213 42 post_install()
erjo@12213 43 {
Hans-G?nter@23141 44 if [ -f "$1/var/spool/cron/crontabs/root" ]
Hans-G?nter@23141 45 then
erjo@12213 46 echo "Runing post install command..."
erjo@12213 47 echo -e "#Run log rotation\n25 6 * * * /usr/sbin/logrotate /etc/logrotate.conf " \
pascal@18730 48 >> "$1/var/spool/cron/crontabs/root"
erjo@12213 49 fi
erjo@12213 50 }
erjo@12213 51
erjo@12213 52
erjo@12213 53 post_remove()
erjo@12213 54 {
Hans-G?nter@23141 55 if [ -f "$1/var/spool/cron/crontabs/root" ]
Hans-G?nter@23141 56 then
erjo@12213 57 echo "Runing post install command..."
pascal@18730 58 sed -i s!.*logrotate.*!! "$1/var/spool/cron/crontabs/root"
erjo@12213 59 fi
erjo@12213 60 }