aboutsummaryrefslogtreecommitdiff
path: root/net/chrony/Makefile
blob: bec2ac3675a2b5a38a8c688c58daa4e70ee39618 (plain) (blame)
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
68
69
70
# Created by: Masaki TAGAWA <masaki@club.kyutech.ac.jp>
# $FreeBSD$

PORTNAME=	chrony
PORTVERSION=	3.5
CATEGORIES=	net
MASTER_SITES=	http://download.tuxfamily.org/chrony/

MAINTAINER=	yonas@fizk.net
COMMENT=	System clock synchronization client and server

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

USERS=		chronyd
GROUPS=		chronyd

USES=		cpe gmake libedit
CPE_VENDOR=	tuxfamily
HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--prefix=${PREFIX} \
		--chronyvardir=/var/db/${PORTNAME} \
		--sysconfdir=${PREFIX}/etc --mandir=${MANPREFIX}/man \
		--datarootdir=${DATADIR} --docdir=${DOCSDIR} \
		--with-readline-library=${LOCALBASE}/lib \
		--with-user=chronyd --without-tomcrypt
USE_RC_SUBR=	chronyd

ALL_TARGET=	all
INSTALL_TARGET=	install
PORTDOCS=	FAQ NEWS README
PORTEXAMPLES=	chrony.conf.example1 chrony.conf.example2 \
		chrony.conf.example3 chrony.keys.example

# XXX: there are also other potentially useful options worth looking into:
#  --disable-pps        Disable PPS API support
OPTIONS_DEFINE=		DOCS EXAMPLES IPV6 NETTLE NSS
OPTIONS_DEFAULT=	NETTLE

NETTLE_DESC=		Nettle crypto library support
NSS_DESC=		Add support for more hashing algorithms

IPV6_CONFIGURE_OFF=	--disable-ipv6
NETTLE_CONFIGURE_OFF=	--without-nettle
NETTLE_LIB_DEPENDS=	libnettle.so:security/nettle
NSS_BROKEN=		Crashes on startup with NSS. See https://bugs.freebsd.org/223840
NSS_CONFIGURE_OFF=	--without-nss
NSS_LIB_DEPENDS=	libfreebl3.so:security/nss
NSS_USES=		pkgconfig

post-patch:
	@cd ${WRKSRC}/examples && \
		${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!g' ${PORTEXAMPLES}

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/chronyc
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/chronyd
	${INSTALL_DATA} ${WRKSRC}/examples/chrony.conf.example3 \
		${STAGEDIR}${PREFIX}/etc/chrony.conf.sample

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	cd ${WRKSRC}/examples && \
		${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>