APKBUILD 1.67 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3
pkgname=logrotate
4
pkgver=3.15.0
5
pkgrel=0
6
pkgdesc="Tool to rotate logfiles"
7
url="https://github.com/logrotate/logrotate"
8
arch="all"
9
license="GPL-2.0-or-later"
10
depends=""
11
makedepends="popt-dev autoconf automake libtool"
12
subpackages="$pkgname-doc $pkgname-openrc"
13
source="$url/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
14 15
	logrotate.cron
	logrotate.conf
16
	logrotate.confd"
17
builddir="$srcdir"/$pkgname-$pkgver
18

19
prepare() {
20
	default_prepare
21 22

	cd "$builddir"
23
	./autogen.sh
24 25
}

26
build() {
27
	cd "$builddir"
28 29 30 31 32
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
33
		--mandir=/usr/share/man \
34 35
		--localstatedir=/var
	make
36 37 38
}

package() {
39
	cd "$builddir"
40 41
	make DESTDIR="$pkgdir" install || return 1

42
	install -dm755 "$pkgdir"/etc/logrotate.d/
43
	install -Dm644 ../logrotate.conf \
44
		"$pkgdir"/etc/logrotate.conf
45

46
	install -Dm755 "$srcdir"/logrotate.cron \
47
		"$pkgdir"/etc/periodic/daily/logrotate
48
	install -Dm644 "$srcdir"/logrotate.confd  \
49
		"$pkgdir"/etc/conf.d/logrotate
50
}
51

52
sha512sums="2c5dd6e7b3612ab53a80630068686f44029e3da898c404e221b14664630d625eabaf0072b5bdee7e19395019e3df8b3a1c314fef00bea1d48fa89abbfa67808a  logrotate-3.15.0.tar.xz
53
f4d708594fb2b240cfc2928f38a180d27c2cecb9867e048dc29a32c0147244db4d2f6d92e7bff27e1f2623537587db87b2f8fc9bb988f98eff0c98f79f5a5bf2  logrotate.cron
54
9e6a1d024b1cf1ddb8b631fdc1379bfecbfeb1af873930d2a19d32313b26881926df5c21b47b55ada2b6012be981ec2d6d8fa2f249a68b61fd2c97c32f52a957  logrotate.conf
55
be9f0043b594d26b4f64e07a2188d19c3c43af75ef726305e4d98f744fc16cee9f280227116858e2f5b781c0a7b58e0209d7e9ab1285dfa7ba55a9dfda700229  logrotate.confd"