aboutsummaryrefslogtreecommitdiffstats
path: root/main/chrony/APKBUILD
blob: c7e4553443ab6eaf8f22f197159ea8097a1c0ddd (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
58
59
60
61
62
63
64
65
66
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=chrony
pkgver=1.27
pkgrel=0
_ver=${pkgver/_/-}
pkgdesc="NTP client and server programs"
url="http://chrony.tuxfamily.org/"
arch="all"
license="GPL-2"
depends="logrotate"
makedepends="texinfo"
subpackages="$pkgname-doc"
source="http://download.tuxfamily.org/chrony/$pkgname-$_ver.tar.gz
	0001-uclibc-res-do-not-call-res_init.patch
	0002-ntp_sources-decrease-maximum-re-resolving-delay.patch
	chronyd.confd
	chronyd.initd
	chrony.logrotate
	chrony.conf
	"

_builddir="$srcdir"/$pkgname-$_ver
prepare() {
	local i
	cd "$_builddir"

	for i in $source; do
		case $i in
		*.diff|*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1
		esac
	done
	sed -i "s:/etc/chrony:/etc/chrony/chrony:g" \
		chrony*.[158] faq.txt chrony.texi || die "sed failed"
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--disable-readline

	make all docs || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	install -D -m644 examples/*.example "$pkgdir"/usr/share/doc/chrony/

	install -m755 -D "$srcdir"/chronyd.initd "$pkgdir"/etc/init.d/chronyd
	install -m644 -D "$srcdir"/chronyd.confd "$pkgdir"/etc/conf.d/chronyd
	mkdir -p "$pkgdir"/var/lib/chrony \
		"$pkgdir"/var/log/chrony \
		"$pkgdir"/etc/chrony
	touch "$pkgdir"/etc/chrony/chrony.drift
	install -m644 "$srcdir"/chrony.conf "$pkgdir"/etc/chrony/chrony.conf
}
md5sums="09185059c85789f7a62076d6e069437f  chrony-1.27-pre1.tar.gz
c479553205e2dfe1409c7924b0d0f81b  0001-uclibc-res-do-not-call-res_init.patch
1f72a2805160dfa653866e0963256f7f  0002-ntp_sources-decrease-maximum-re-resolving-delay.patch
d62521b4c8837e15262c47ac88359307  chronyd.confd
f0c73948224cc1706cf9c94e4d2d7b69  chronyd.initd
468eaf2b5465d60b3ee021ce3f948ab1  chrony.logrotate
46f42c52953d398ca44d6baa449618d7  chrony.conf"