🔒 Repository is read-only – file editing is disabled.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
pkgname: logrotate
pkgver: '3.22.0'
pkgrel: '2'
pkgdesc: 'Rotates system logs automatically'
url: 'https://github.com/logrotate/logrotate'
arch: x86_64
depends: []
makedepends:
- popt
- gzip
- acl
- systemd
source:
- 'https://github.com/logrotate/logrotate/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz'
- 'logrotate.conf'
sha256sums:
- SKIP
- SKIP
build: |
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--mandir=/usr/share/man \
--with-compress-command=/usr/bin/gzip \
--with-uncompress-command=/usr/bin/gunzip \
--with-default-mail-command=/usr/bin/mail \
--with-acl
make
package: |
cd ${pkgname}-${pkgver}
make DESTDIR=${PKGDIR} install
mkdir -p ${PKGDIR}/etc/${pkgname}.d
mkdir -p ${PKGDIR}/var/state/logrotate
install -D -m 640 ../${pkgname}.conf ${PKGDIR}/etc/${pkgname}.conf
cat > ${PKGDIR}/etc/logrotate.d/sys.log << EOF
/var/log/sys.log {
# If the log file is larger than 100kb, rotate it
size 100k
rotate 5
weekly
postrotate
/bin/killall -HUP syslogd
endscript
update: |
feed=https://github.com/${pkgname}/${pkgname}/releases/.atom
exec="lynx -read_timeout=20 -dump -listonly -nonumbers $feed"
ligne=1 # nombre de notification ? afficher
$exec $feed | grep title | \
sed "s@<title>@@" | \
sed "s@</title>@@" | \
sed "s@logrotate-@@" | \
head -n $(($ligne+1)) | \
tail -n $(($ligne))