For some reason the PID written to the pidfile by htpdate does not match its actual PID, which renders the standard PID-handling mechanism of rc.subr(8) useless. As a solution, depend only on the process name to figure out the PID of the running process. NB: the old pidfile has to be removed before starting htpdate. Otherwise, the program complains about the pidfile already existing (which htpdate interprets as another instance of htpdate already running). Also: - Use %%PREFIX%% to let the ports provide a proper path for the binary. - Do not specify htpdate_flags in command_args. htpdate_flags are already passed to the program by rc.subr(8). In response to this mailing list thread: https://lists.freebsd.org/pipermail/freebsd-rc/2019-August/004047.html Submitted by: 0mp@ Differential Revision: https://reviews.freebsd.org/D21431
35 lines
813 B
Makefile
35 lines
813 B
Makefile
# Created by: Vsevolod Stakhov <vsevolod@highsecure.ru>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= htpdate
|
|
PORTVERSION= 1.2.2
|
|
PORTREVISION= 1
|
|
CATEGORIES= net ipv6
|
|
MASTER_SITES= http://www.vervest.org/htp/archive/c/ \
|
|
http://twekkel.home.xs4all.nl/htp/
|
|
|
|
MAINTAINER= jgh@FreeBSD.org
|
|
COMMENT= Time synchronization over http utility
|
|
|
|
LICENSE= GPLv2+
|
|
|
|
USES= tar:xz
|
|
|
|
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}"
|
|
|
|
PLIST_FILES= bin/${PORTNAME} man/man8/${PORTNAME}.8.gz
|
|
PORTDOCS= Changelog README
|
|
USE_RC_SUBR= ${PORTNAME}
|
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
.for doc in ${PORTDOCS}
|
|
${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
|
|
.endfor
|
|
|
|
.include <bsd.port.mk>
|