aboutsummaryrefslogtreecommitdiffstats
path: root/main/openntpd/APKBUILD
blob: 9954bc671fa2b8a8ac4ecae4a08d03731a9e0e0d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openntpd
pkgver=6.2_p2
_pkgver=${pkgver/_/}
pkgrel=0
pkgdesc="Lightweight NTP server ported from OpenBSD"
url="http://www.openntpd.org/"
subpackages="openntpd-doc"
makedepends="libressl-dev linux-headers bsd-compat-headers"
arch="all"
license="BSD"
options="!check"
source="http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$_pkgver.tar.gz
	ntp-user.patch
	fix-__dead-macro.patch
	$pkgname.confd
	$pkgname.initd
	"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--with-privsep-user=ntp
	make
}

package() {
	cd "$builddir"

	make install DESTDIR="$pkgdir"

	mkdir -p "$pkgdir"/var/empty
	install -Dm755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/"$pkgname"
	install -Dm644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/"$pkgname"
	rmdir "$pkgdir"/var/run
}

sha512sums="b8559aa8ceaf796a94a21f8a6d4dfd2edfdc4587845c73cd6d27c81d200355c3e40e72644b3a558e9bfe4fd0d2aafae98b50c581e67ac72eec53eeeabd9cb882  openntpd-6.2p2.tar.gz
290311e5cd074d5bd1e6374ba9b4776e4acf792d47011c43412e236766b73be2b0e5f0091bd3ad79d0b637754531889b199e66c64952765bbcd1bade0d2ebe94  ntp-user.patch
388895fd07745c43b5ac0683f72154ebdc398e245d8cd0743a8af2cfca2995a01f4d459e1f1a0cb4a0d1e49b92c96f365427dee307104b19268c74ed836a7f92  fix-__dead-macro.patch
01c3d9ed18741981fb2d8ebb509cd71801b57f57fcac48ed727687a6402dbad8a791ace1e63c0069a07b0dbcbc98c917885c942dab9616d25dde429f1fb9c348  openntpd.confd
009eb7c7cf290c9302d9585ce7dffb2195e7e73c8bd3274b158efde10b537919c5dc4a47038f2fca6d650bcd79e8333395faa06d98f28327a328368fd59a1618  openntpd.initd"