diff --git a/net/ptpd2/Makefile b/net/ptpd2/Makefile index 6deaa88b3a68..0248157471b0 100644 --- a/net/ptpd2/Makefile +++ b/net/ptpd2/Makefile @@ -1,40 +1,40 @@ PORTNAME= ptpd DISTVERSION= 2.3.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net PKGNAMESUFFIX= 2 MAINTAINER= skreuzer@FreeBSD.org COMMENT= Implementation of the precision time protocol IEEE 1588-2008 WWW= https://github.com/ptpd/ptpd LICENSE= BSD2CLAUSE CONFLICTS= ptpd2-devel.* ETCDIR= ${PREFIX}/etc/${PORTNAME}${PKGNAMESUFFIX} USES= autoreconf gmake libtool GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share USE_GITHUB= yes GH_TAGNAME= d27a6e0 USE_RC_SUBR= ptpd2 PORTDOCS= * OPTIONS_DEFINE= DOCS SNMP OPTIONS_DEFAULT=SNMP SNMP_CONFIGURE_ENABLE= snmp SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp post-install: ${MKDIR} ${STAGEDIR}${ETCDIR} ${CP} ${FILESDIR}/*.sample ${STAGEDIR}${ETCDIR} post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} .include diff --git a/net/ptpd2/files/ptpd2.in b/net/ptpd2/files/ptpd2.in index 19e341dc5796..d084ae8afb77 100644 --- a/net/ptpd2/files/ptpd2.in +++ b/net/ptpd2/files/ptpd2.in @@ -1,22 +1,28 @@ #!/bin/sh # PROVIDE: ptpd2 # REQUIRE: NETWORKING DAEMON # KEYWORD: nojail # # Add the following lines to /etc/rc.conf to enable ptpd # # ptpd2_enable (bool): Set to "NO" by default # Set it to "YES" to enable ptpd +# ptp2_configfile (str): Set to "/usr/local/etc/ptpd2/ptpd2.conf" by default . /etc/rc.subr -name="ptpd2" +name=ptpd2 rcvar=ptpd2_enable -command="%%PREFIX%%/sbin/${name}" +load_rc_config "${name}" -ptpd2_enable=${ptpd2_enable:-"NO"} +: ${ptpd2_enable:=NO} +: ${ptpd2_configfile:=/usr/local/etc/ptpd2/ptpd2.conf} + +required_files="${ptpd2_configfile}" + +command="/usr/local/sbin/${name}" +command_args="-c ${ptpd2_configfile}" -load_rc_config $name run_rc_command "$1"