aboutsummaryrefslogtreecommitdiffstats
path: root/main/openntpd/APKBUILD
blob: c964c5e581ddade4e1416cc0109fb1eaf0329ba4 (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=6.0_p1
_myver=${pkgver/_/}
pkgrel=3
pkgdesc="Lightweight NTP server ported from OpenBSD"
url="http://www.openntpd.org/"
subpackages="openntpd-doc"
depends=""
makedepends="libressl-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="9388979cc2713551bfbdfb3864291abe  openntpd-6.0p1.tar.gz
e811d18679dbd64d0309a810abe5a5a3  ntp-user.patch
e3eee9eb2ea092dfdf9d887cd6df5795  openntpd.confd
e7856ad0eef420922f1d501d9ccac117  openntpd.initd"
sha256sums="b1ab80094788912adb12b33cb1f251cc58db39294c1b5c6376972f5f7ba577e8  openntpd-6.0p1.tar.gz
7498658ced6c83a7308800c90889b3bc628071cd745916b03c51c4e49c4df63f  ntp-user.patch
a1cb9dc8fbbaf6f439d6547bce9d59e86e7e13855b037d33bad1f789fb7050f3  openntpd.confd
42987f19f2fc54455c8aeed0e9bc586ceafae85762cb20e33858139208ab6c79  openntpd.initd"
sha512sums="a71c516dbe7596cbcb3a385112a59a82185b7e3d93a52eda695cea5a0a599ba7fbf58daa81da55d608255cb6950398123fa7d71663604a4c3bcbee949711296d  openntpd-6.0p1.tar.gz
290311e5cd074d5bd1e6374ba9b4776e4acf792d47011c43412e236766b73be2b0e5f0091bd3ad79d0b637754531889b199e66c64952765bbcd1bade0d2ebe94  ntp-user.patch
a80de3a07eadebeb67b2a3532713df34f1c2113965001f50bdad90f66df6fe57af08e9fba7afac9c5f0afb52d2318c120cd4eb428255f8bc5ef748cefd7e106a  openntpd.confd
0cdead06e4b359ecedb1065c929ddd66ef3bc5d321bd96e462abf1f55ab289c36793ee5e8f4262c0b7ef7e3532f3613fa66ca22e88f742814f357310465b7d99  openntpd.initd"