summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0246260474a6f4104353997d7f9a8e37af85030b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: 0strodamus <0strodamus at cox dot net>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
#
# logrotate with cron daily job restored from logrotate-3.8.7-1

pkgname=logrotate-nosystemd
_pkgname=logrotate
pkgver=3.12.3
pkgrel=1
pkgdesc="Rotates system logs automatically"
arch=('i686' 'x86_64')
url="https://github.com/logrotate/logrotate"
license=('GPL')
groups=('base')
depends=('popt' 'gzip' 'acl')
optdepends=('cron: scheduled log rotation')
provides=('logrotate')
conflicts=('logrotate')
backup=('etc/logrotate.conf')
source=("https://github.com/logrotate/logrotate/releases/download/${pkgver}/${_pkgname}-${pkgver}.tar.xz"{,.asc}
        'logrotate.conf'
        'logrotate.cron.daily')
md5sums=('a560c57fac87c45b2fc17406cdf79288'
         'SKIP'
         '94dae4d3eded2fab9ae879533d3680db'
         'dd5fd26724274fd9c827eadad60ff4c5')
validpgpkeys=('992A96E075056E79CD8214F9873DB37572A37B36')

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 -Dm744 "${srcdir}/logrotate.cron.daily" "${pkgdir}/etc/cron.daily/logrotate"
}