diff options
Diffstat (limited to 'net/chrony')
-rw-r--r-- | net/chrony/Makefile | 37 | ||||
-rw-r--r-- | net/chrony/files/chronyd.in | 21 | ||||
-rw-r--r-- | net/chrony/pkg-plist | 5 |
3 files changed, 51 insertions, 12 deletions
diff --git a/net/chrony/Makefile b/net/chrony/Makefile index bec2ac3675a2..aee4d9d2e3ab 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -3,6 +3,7 @@ PORTNAME= chrony PORTVERSION= 3.5 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://download.tuxfamily.org/chrony/ @@ -12,10 +13,10 @@ COMMENT= System clock synchronization client and server LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING +USES= cpe gmake libedit pkgconfig USERS= chronyd GROUPS= chronyd -USES= cpe gmake libedit CPE_VENDOR= tuxfamily HAS_CONFIGURE= yes CONFIGURE_ARGS= --prefix=${PREFIX} \ @@ -34,22 +35,39 @@ PORTEXAMPLES= chrony.conf.example1 chrony.conf.example2 \ # 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_DEFINE= DOCS HTMLDOCS EXAMPLES IPV6 OPTIONS_DEFAULT= NETTLE +OPTIONS_RADIO= CRYPTLIB +OPTIONS_RADIO_CRYPTLIB= NETTLE NSS +HTMLDOCS_IMPLIES= DOCS +OPTIONS_SUB= yes +HTMLDOCS_DESC= Build HTML docs (IMPLIES DOCS, needs ruby, asciidoctor) NETTLE_DESC= Nettle crypto library support -NSS_DESC= Add support for more hashing algorithms +NSS_DESC= NSS-based 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 + +HTMLDOCS_BUILD_DEPENDS+=asciidoctor:textproc/rubygem-asciidoctor +HTMLDOCS_ALL_TARGET= docs +HTMLDOCS_INSTALL_TARGET=docs + +.include <bsd.port.pre.mk> + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --enable-debug +.endif + +.if ${PORT_OPTIONS:MHTMLDOCS} +PORTDOCS+= doc/*.html +.endif post-patch: - @cd ${WRKSRC}/examples && \ + cd ${WRKSRC}/examples && \ ${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!g' ${PORTEXAMPLES} post-install: @@ -59,12 +77,13 @@ post-install: ${STAGEDIR}${PREFIX}/etc/chrony.conf.sample post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${RM} doc/installation.html cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && \ ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net/chrony/files/chronyd.in b/net/chrony/files/chronyd.in index 55f1053c5f61..b16d21b1aea6 100644 --- a/net/chrony/files/chronyd.in +++ b/net/chrony/files/chronyd.in @@ -4,17 +4,32 @@ # # PROVIDE: chronyd # REQUIRE: DAEMON +# KEYWORD: nojail shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# chronyd_enable (bool): Set it to "YES" to enable chronyd +# Default is "NO" +# chronyd_config (str): Set full path to configuration file. +# Default is "%%PREFIX%%/etc/chrony.conf" +# chronyd_flags (str): Flags passed to chronyd(8) +# Default is "" # . /etc/rc.subr name=chronyd rcvar=chronyd_enable -command=%%PREFIX%%/sbin/${name} -rc_flags="${chronyd_flags}" load_rc_config ${name} -: ${chronyd_enable="NO"} +: ${chronyd_enable:="NO"} +: ${chronyd_config:="%%PREFIX%%/etc/chrony.conf"} + +command=%%PREFIX%%/sbin/${name} +command_args="-f ${chronyd_config}" +pidfile=/var/run/chrony/${name}.pid +required_files=${chronyd_config} run_rc_command "$1" diff --git a/net/chrony/pkg-plist b/net/chrony/pkg-plist index 400d0099252f..da2579e0b05a 100644 --- a/net/chrony/pkg-plist +++ b/net/chrony/pkg-plist @@ -5,3 +5,8 @@ man/man5/chrony.conf.5.gz man/man8/chronyd.8.gz sbin/chronyd @dir(chronyd,chronyd) /var/db/chrony +%%HTMLDOCS%%%%DOCSDIR%%/chrony.conf.html +%%HTMLDOCS%%%%DOCSDIR%%/chronyc.html +%%HTMLDOCS%%%%DOCSDIR%%/chronyd.html +%%HTMLDOCS%%%%DOCSDIR%%/faq.html +%%HTMLDOCS%%%%DOCSDIR%%/installation.html |