123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- set -e
- program=logrotate
- version=3.19.0
- release=1
- pkgcategory=tools
- tarname=${program}-${version}.tar.gz
- fetch=https://github.com/logrotate/logrotate/releases/download/${version}/${tarname}
- description="
- Utility to rotate system logs automatically.
- The logrotate utility is designed to simplify the administration of
- log files on a system which generates a lot of log files. Logrotate
- allows for the automatic rotation compression, removal and mailing of
- log files. Logrotate can be set to handle a log file daily, weekly,
- monthly or when the log file gets to a certain size.
- "
- homepage=https://github.com/logrotate/logrotate
- license=GPLv2+
- docs="ChangeLog.md COPYING README.md"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
-
- chmod -R u+w,go-w,a+rX-s .
- ./configure CPPFLAGS="$QICPPFLAGS" \
- CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
- $configure_args \
- --mandir=$mandir \
- --with-compress-command="/usr/bin/lzip -9"\
- --with-uncompress-command="/usr/bin/lzip -d" \
- --with-compress-extension=.lz \
- --with-default-mail-command=/usr/bin/mail \
- --with-acl \
- --without-selinux \
- --build="$(gcc -dumpmachine)"
- make -j${jobs} V=1
- make -j${jobs} DESTDIR="$destdir" install
- mkdir -p "${destdir}/etc/logrotate.d" "${destdir}/etc/cron.daily"
- cp -p examples/logrotate.conf "${destdir}/etc"
- chmod 644 "${destdir}/etc/logrotate.conf"
-
- sed -i "s|#compress|compress|" "${destdir}/etc/logrotate.conf"
- touch "${destdir}/etc/.graft-config"
- cp -p "${worktree}/archive/logrotate/logrotate.cron" \
- "${destdir}/etc/cron.daily/logrotate"
- chmod 755 "${destdir}/etc/cron.daily/logrotate"
-
- lzip -9 "${destdir}/${mandir}"/man?/*
-
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|