archrelease: copy trunk to extra-x86_64
[arch-packages.git] / logrotate / repos / core-x86_64 / PKGBUILD
blob52323719e546e2c04b28f4e6129ac9c53470e6b0
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgname=logrotate
4 pkgver=3.21.0
5 pkgrel=2
6 pkgdesc="Rotates system logs automatically"
7 arch=('x86_64')
8 url="https://github.com/logrotate/logrotate"
9 license=('GPL')
10 depends=('popt' 'gzip' 'acl')
11 backup=('etc/logrotate.conf')
12 source=("https://github.com/logrotate/logrotate/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}
13         'logrotate.conf')
14 sha256sums=('8fa12015e3b8415c121fc9c0ca53aa872f7b0702f543afda7e32b6c4900f6516'
15             'SKIP'
16             '42e289081a4d6b144c89dbfc49bde7a01b383055bf90a05a764f8c3dee25a6ce')
17 validpgpkeys=('992A96E075056E79CD8214F9873DB37572A37B36')
19 build() {
20         cd "$srcdir/${pkgname}-${pkgver}"
22         ./configure \
23                 --prefix=/usr \
24                 --sbindir=/usr/bin \
25                 --mandir=/usr/share/man \
26                 --with-compress-command=/usr/bin/gzip \
27                 --with-uncompress-command=/usr/bin/gunzip \
28                 --with-default-mail-command=/usr/bin/mail \
29                 --with-acl
30         make
33 check() {
34         cd "$srcdir/${pkgname}-${pkgver}"
36         make test
39 package() {
40         cd "$srcdir/${pkgname}-${pkgver}"
42         make DESTDIR="$pkgdir" install
44         install -dm755 "$pkgdir/etc/logrotate.d"
45         install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
47         install -D -m644 examples/logrotate.timer "${pkgdir}/usr/lib/systemd/system/logrotate.timer"
48         install -D -m644 examples/logrotate.service "${pkgdir}/usr/lib/systemd/system/logrotate.service"
49         install -d -m755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
50         ln -s ../logrotate.timer "$pkgdir/usr/lib/systemd/system/timers.target.wants/logrotate.timer"