PKGBUILD 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Maintainer: Pierre Schmitz <pierre@archlinux.de>
  2. pkgname=logrotate
  3. pkgver=3.14.0
  4. pkgrel=1
  5. pkgdesc="Rotates system logs automatically"
  6. arch=(x86_64 ppc64le)
  7. url="https://github.com/logrotate/logrotate"
  8. license=('GPL')
  9. groups=('base')
  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. md5sums=('1c0f6e6e490c4bcac0a1e77ad1310683'
  15. 'SKIP'
  16. '94dae4d3eded2fab9ae879533d3680db')
  17. validpgpkeys=('992A96E075056E79CD8214F9873DB37572A37B36')
  18. build() {
  19. cd "$srcdir/${pkgname}-${pkgver}"
  20. ./configure \
  21. --prefix=/usr \
  22. --sbindir=/usr/bin \
  23. --mandir=/usr/share/man \
  24. --with-compress-command=/usr/bin/gzip \
  25. --with-uncompress-command=/usr/bin/gunzip \
  26. --with-default-mail-command=/usr/bin/mail \
  27. --with-acl
  28. make
  29. }
  30. check() {
  31. cd "$srcdir/${pkgname}-${pkgver}"
  32. make test
  33. }
  34. package() {
  35. cd "$srcdir/${pkgname}-${pkgver}"
  36. make DESTDIR="$pkgdir" install
  37. install -dm755 "$pkgdir/etc/logrotate.d"
  38. install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
  39. install -D -m644 examples/logrotate.timer ${pkgdir}/usr/lib/systemd/system/logrotate.timer
  40. install -D -m644 examples/logrotate.service ${pkgdir}/usr/lib/systemd/system/logrotate.service
  41. install -d -m755 $pkgdir/usr/lib/systemd/system/timers.target.wants
  42. ln -s ../logrotate.timer $pkgdir/usr/lib/systemd/system/timers.target.wants/logrotate.timer
  43. }