sysutils/zrepl: various improvements

* Drop unneeded FreeBSD check, this was tracked down to a version check
  not being fully removed. Only the version check was removed but the
  FreeBSD check remained unnecessarily.
* Limit the syslog sample to zrepl log messages, other daemons
  use local0 as facility too.
* Switch to uses:ncurses
This commit is contained in:
Dries Michiels
2023-01-09 23:03:28 +01:00
parent a566d95040
commit e7682c8251
3 changed files with 5 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
PORTNAME= zrepl
DISTVERSIONPREFIX= v
DISTVERSION= 0.6.0
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= driesm@FreeBSD.org
@@ -10,7 +11,7 @@ WWW= https://zrepl.github.io/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
USES= go:modules ncurses
USE_RC_SUBR= zrepl
GO_MODULE= github.com/${PORTNAME}/${PORTNAME}
@@ -27,21 +28,6 @@ MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.8.5,1:textproc/py-sphin
MANPAGES_USES= gmake python:build,3.6+
MANPAGES_PLIST_FILES= man/man1/zrepl.1.gz
.include <bsd.port.options.mk>
.if ${OPSYS} == "FreeBSD" && ${OSVERSION} >= 1300079
USES+= ncurses
.else
USES+= ncurses:port
CFLAGS+= -I${LOCALBASE}/include/ncurses
.endif
.if ${OPSYS} == "FreeBSD"
SUB_LIST+= DAEMON_LOGGING="-S -l \$${zrepl_facility} -s \$${zrepl_priority} -T \$${name}"
.else
SUB_LIST+= DAEMON_LOGGING=""
.endif
post-build-MANPAGES-on:
@${MAKE_CMD} -C ${WRKSRC}/docs SPHINXBUILD=sphinx-build-${PYTHON_VER} man

View File

@@ -3,4 +3,5 @@
#
# SELECTOR ACTION
# FACILITY.[!<=>]LEVEL
!zrepl
local0.info /var/log/zrepl.log

View File

@@ -43,7 +43,8 @@ load_rc_config $name
pidfile="/var/run/zrepl.pid"
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/zrepl"
command_args="-p ${pidfile} %%DAEMON_LOGGING%% ${procname} ${zrepl_options} daemon"
command_args="-p ${pidfile} -S -l ${zrepl_facility} -s ${zrepl_priority} -T ${name} \
${procname} ${zrepl_options} daemon"
start_precmd="zrepl_precmd"
stop_postcmd="zrepl_postcmd"