aboutsummaryrefslogtreecommitdiffstats
path: root/community/ntpsec/APKBUILD
blob: 1f9af64cbcef392cc4cc2b136cb8c39ad65b159c (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
# Contributor: tcely <ntpsec+aports@tcely.33mail.com>
# Maintainer:
pkgname=ntpsec
pkgver=1.2.1
pkgrel=1
pkgdesc="NTP reference implementation, refactored for security"
url="https://www.ntpsec.org/"
arch="all"
license="BSD-2-Clause"
depends="bash busybox python3 py3-gpsd"
makedepends="python3-dev bison asciidoc openssl1.1-compat-dev linux-headers"
subpackages="$pkgname-doc $pkgname-dev"
source="https://ftp.ntpsec.org/pub/releases/ntpsec-$pkgver.tar.gz"

# secfixes:
#   1.2.1-r0:
#     - CVE-2021-22212
#   1.1.3-r0:
#     - CVE-2019-6442
#     - CVE-2019-6443
#     - CVE-2019-6444
#     - CVE-2019-6445

prepare() {
	default_prepare

	grep -r -l '#! /usr/bin/env python' . \
		| xargs sed -i '1s/^.*$/#!\/usr\/bin\/python3/'

}

build() {
	./waf configure \
		--prefix=/usr \
		--python=python3 \
		--enable-leap-smear \
		--enable-mssntp \
		--refclock=all \
		--pyshebang=/usr/bin/python3
	./waf build --verbose
}

check() {
	./waf check --verbose
}

package() {
	./waf install --destdir="$pkgdir"
}

sha512sums="
0b8b0bda52d3025f6e9a06c00b1e0c25c595ada72b87ed0e5d3d6f77a034f557745156bc6d9a263c9876c041efffa38d42fa93ba8bfda31f67efbd842a726277  ntpsec-1.2.1.tar.gz
"