APKBUILD 1.78 KB
Newer Older
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
3
pkgname=logrotate
4
pkgver=3.12.3
5
pkgrel=0
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
6
pkgdesc="Tool to rotate logfiles"
Sören Tempel's avatar
Sören Tempel committed
7
url="https://github.com/logrotate/logrotate"
8
arch="all"
9 10
license="GPL2"
depends=""
11
makedepends="popt-dev autoconf automake libtool"
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
12
subpackages="$pkgname-doc"
13
source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz
14 15
	logrotate.cron
	logrotate.conf
16
	logrotate.confd"
17
builddir="$srcdir"/$pkgname-$pkgver
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
18

19
prepare() {
20
	default_prepare || return 1
21 22

	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
23
	./autogen.sh || return 1
24 25
}

Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
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 \
		|| return 1
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
36
	make || return 1
37 38 39
}

package() {
40
	cd "$builddir"
41 42 43 44 45 46
	make DESTDIR="$pkgdir" install || return 1

	install -dm755 "$pkgdir"/etc/logrotate.d/ || return 1
	install -Dm644 ../logrotate.conf \
		"$pkgdir"/etc/logrotate.conf || return 1

47 48 49
	install -Dm755 "$srcdir"/logrotate.cron \
		"$pkgdir"/etc/periodic/daily/logrotate || return 1
	install -Dm644 "$srcdir"/logrotate.confd  \
50
		"$pkgdir"/etc/conf.d/logrotate || return 1
Carlo Lanmdeter's avatar
Carlo Lanmdeter committed
51
}
52

53
sha512sums="57c46ab66c3c75c100d315a109f19b816e15724a9eb6427ac6f614a17d65a38ed031b2b1cdce383bbaddc4c73efa8fc03d221a6fa0c5f240794285ce0903ab69  logrotate-3.12.3.tar.gz
54
f4d708594fb2b240cfc2928f38a180d27c2cecb9867e048dc29a32c0147244db4d2f6d92e7bff27e1f2623537587db87b2f8fc9bb988f98eff0c98f79f5a5bf2  logrotate.cron
55
9e6a1d024b1cf1ddb8b631fdc1379bfecbfeb1af873930d2a19d32313b26881926df5c21b47b55ada2b6012be981ec2d6d8fa2f249a68b61fd2c97c32f52a957  logrotate.conf
56
be9f0043b594d26b4f64e07a2188d19c3c43af75ef726305e4d98f744fc16cee9f280227116858e2f5b781c0a7b58e0209d7e9ab1285dfa7ba55a9dfda700229  logrotate.confd"