aboutsummaryrefslogtreecommitdiffstats
path: root/main/openntpd/APKBUILD
blob: 17058391ce2e61c8560c67397cf6aab82152db32 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openntpd
pkgver=3.9_p1
_myver=3.9p1
pkgrel=10
pkgdesc="Lightweight NTP server ported from OpenBSD"
url=http://www.openntpd.org/
install=openntpd.pre-install

subpackages="openntpd-doc"
depends=
makedepends="openssl-dev"
arch="all"
license=BSD
source="
	ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-$_myver.tar.gz
	openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
	openntpd.confd
	openntpd.initd
	"

prepare() {
	cd "$srcdir/$pkgname-$_myver"
	patch -p1 < ../openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
	sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || return 1
	update_config_sub
}

build() {
	cd "$srcdir/$pkgname-$_myver"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$_myver"
	make install DESTDIR="$pkgdir"
	install -Dm755 ../openntpd.initd "$pkgdir/etc/init.d/ntpd"
	install -Dm644 ../openntpd.confd "$pkgdir/etc/conf.d/ntpd"
}

md5sums="afc34175f38d08867c1403d9008600b3  openntpd-3.9p1.tar.gz
ae2f708b860975b64126bb316aeb6641  openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
e3eee9eb2ea092dfdf9d887cd6df5795  openntpd.confd
57a508a730359d526d3eb5afb525c0c3  openntpd.initd"
sha256sums="83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49  openntpd-3.9p1.tar.gz
97043f4a19468bc275326e6cd1b8aee8dfe6123746a8e857a5b1fa63f7f9a044  openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
a1cb9dc8fbbaf6f439d6547bce9d59e86e7e13855b037d33bad1f789fb7050f3  openntpd.confd
f5772bbb2ab97609e255467a3bad752cd92bf09b5aaa6cd31b9d232f1e95c705  openntpd.initd"
sha512sums="e19e7242b67c8d12fbf0a78cd29dae4248afff5b5308069b190b663a9f9426666aad20f8c9ec70fabf8d2e5c2a2e61052191fe4ccc132c62a7decd8c498c2a13  openntpd-3.9p1.tar.gz
89862cd1a20961c7c009b50c853770924e852eba6719bb4c3532c2ea193d93d63a2d494f7bee774e33b76e449c6e2c19cb5717ffb2c998326ecce594f6bd3509  openntpd-3.9p1_reconnect_on_sendto_EINVAL.diff
a80de3a07eadebeb67b2a3532713df34f1c2113965001f50bdad90f66df6fe57af08e9fba7afac9c5f0afb52d2318c120cd4eb428255f8bc5ef748cefd7e106a  openntpd.confd
565e3e64338c40f4384bbae781a40e1b899ba1305aec2058c00d186aa506abc39ed6a1ff1a2782575de14aef1774127eb540d083001bd1c186d55dcbc3ac4ced  openntpd.initd"