aboutsummaryrefslogtreecommitdiffstats
path: root/main/openntpd/APKBUILD
blob: 18d260b823336298bf8aff1323fc8f796a7df16d (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
67
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openntpd
pkgver=5.9_p1
_myver=${pkgver/_/}
pkgrel=1
pkgdesc="Lightweight NTP server ported from OpenBSD"
url="http://www.openntpd.org/"
subpackages="openntpd-doc"
depends=""
makedepends="openssl-dev linux-headers bsd-compat-headers"
arch="all"
license="BSD"
install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade"
source="http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-$_myver.tar.gz
	ntp-user.patch
	openntpd.confd
	openntpd.initd
	"

_builddir="$srcdir"/$pkgname-$_myver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--with-privsep-user=ntp \
		|| return 1
	make || return 1
}

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

	mkdir -p "$pkgdir"/var/empty || return 1
	install -Dm755 "$srcdir"/openntpd.initd \
		"$pkgdir"/etc/init.d/"$pkgname" || return 1
	install -Dm644 "$srcdir"/openntpd.confd \
		"$pkgdir"/etc/conf.d/"$pkgname" || return 1
}

md5sums="284f75f18d818c872d5c6ae1f06d6260  openntpd-5.9p1.tar.gz
e811d18679dbd64d0309a810abe5a5a3  ntp-user.patch
e3eee9eb2ea092dfdf9d887cd6df5795  openntpd.confd
e7856ad0eef420922f1d501d9ccac117  openntpd.initd"
sha256sums="200c04056d4d6441653cac71d515611f3903aa7b15b8f5661a40dab3fb3697b3  openntpd-5.9p1.tar.gz
7498658ced6c83a7308800c90889b3bc628071cd745916b03c51c4e49c4df63f  ntp-user.patch
a1cb9dc8fbbaf6f439d6547bce9d59e86e7e13855b037d33bad1f789fb7050f3  openntpd.confd
42987f19f2fc54455c8aeed0e9bc586ceafae85762cb20e33858139208ab6c79  openntpd.initd"
sha512sums="227a4d42f43f4abfaa97fb85cf121d3b9a6646259faeda785dbeb3e4a27285a7f95daf96e72135871a31f772895f3b66c10bd628c87e453507ce69102f5e1213  openntpd-5.9p1.tar.gz
290311e5cd074d5bd1e6374ba9b4776e4acf792d47011c43412e236766b73be2b0e5f0091bd3ad79d0b637754531889b199e66c64952765bbcd1bade0d2ebe94  ntp-user.patch
a80de3a07eadebeb67b2a3532713df34f1c2113965001f50bdad90f66df6fe57af08e9fba7afac9c5f0afb52d2318c120cd4eb428255f8bc5ef748cefd7e106a  openntpd.confd
0cdead06e4b359ecedb1065c929ddd66ef3bc5d321bd96e462abf1f55ab289c36793ee5e8f4262c0b7ef7e3532f3613fa66ca22e88f742814f357310465b7d99  openntpd.initd"