57 lines
1.6 KiB
Text
57 lines
1.6 KiB
Text
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
pkgname=logrotate
|
|
pkgver=3.22.0
|
|
pkgrel=1
|
|
pkgdesc="Rotates system logs automatically"
|
|
arch=('x86_64')
|
|
url="https://github.com/logrotate/logrotate"
|
|
license=('GPL')
|
|
depends=('popt' 'gzip' 'acl')
|
|
backup=('etc/logrotate.conf')
|
|
source=("https://github.com/logrotate/logrotate/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}
|
|
'logrotate.conf')
|
|
sha256sums=('42b4080ee99c9fb6a7d12d8e787637d057a635194e25971997eebbe8d5e57618'
|
|
'SKIP'
|
|
'42e289081a4d6b144c89dbfc49bde7a01b383055bf90a05a764f8c3dee25a6ce')
|
|
validpgpkeys=('8ECCDF12100AD84DA2EE7EBFC78CE737A3C3E28E')
|
|
|
|
prepare() {
|
|
cd "$srcdir/${pkgname}-${pkgver}"
|
|
|
|
echo '#!/bin/true' > test/test-0110.sh
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/${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
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir/${pkgname}-${pkgver}"
|
|
|
|
make test
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/${pkgname}-${pkgver}"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -dm755 "$pkgdir/etc/logrotate.d"
|
|
install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
|
|
|
|
install -D -m644 examples/logrotate.timer "${pkgdir}/usr/lib/systemd/system/logrotate.timer"
|
|
install -D -m644 examples/logrotate.service "${pkgdir}/usr/lib/systemd/system/logrotate.service"
|
|
install -d -m755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
|
|
ln -s ../logrotate.timer "$pkgdir/usr/lib/systemd/system/timers.target.wants/logrotate.timer"
|
|
}
|