net/znc: add -sasl subpackage, a service file and dedicated user

diff from maintainer Aisha Tammy (thanks!) with minor tweaks from me and
sthen.  ok sthen@
This commit is contained in:
op 2022-04-28 22:09:53 +00:00
parent 9416672611
commit cb868f024c
7 changed files with 51 additions and 6 deletions

View File

@ -1,9 +1,10 @@
COMMENT= advanced IRC bouncer
COMMENT-main= advanced IRC bouncer
COMMENT-sasl= SASL module for ZNC
DISTNAME= znc-1.8.2
CATEGORIES= net
MASTER_SITES= ${HOMEPAGE}releases/
REVISION= 2
REVISION-main= 3
HOMEPAGE= https://znc.in/
@ -12,19 +13,28 @@ MAINTAINER= Aisha Tammy <openbsd@aisha.cc>
# Apache 2.0
PERMIT_PACKAGE= Yes
WANTLIB= c crypto icuuc icudata m pthread ssl z ${COMPILER_LIBCXX}
MULTI_PACKAGES= -main -sasl
WANTLIB= crypto icuuc icudata m pthread ssl z ${COMPILER_LIBCXX}
WANTLIB-main= c ${WANTLIB}
WANTLIB-sasl= sasl2 ${WANTLIB}
LIB_DEPENDS= textproc/icu4c
LIB_DEPENDS-sasl= ${LIB_DEPENDS} \
security/cyrus-sasl2
RUN_DEPENDS-sasl= ${BASE_PKGPATH},-main
MODULES= devel/cmake
COMPILER= base-clang ports-gcc
CONFIGURE_ARGS+= -DWANT_CYRUS=NO \
-DWANT_I18N=NO \
-DWANT_ICU=YES
CONFIGURE_ARGS+= -DWANT_I18N=NO
CXXFLAGS+= -DHAVE_OPAQUE_SSL
NO_TEST= Yes
SUBST_VARS+= VARBASE
.include <bsd.port.mk>

1
net/znc/pkg/DESCR-sasl Normal file
View File

@ -0,0 +1 @@
SASL module for ZNC

View File

@ -1,3 +1,13 @@
@pkgpath net/znc
@newgroup _znc:877
@newuser _znc:877:877:default:ZNC Daemon:/nonexistent:/sbin/nologin
@rcscript ${RCDIR}/znc
@owner _znc
@group _znc
@sample ${VARBASE}/znc/
@sample ${VARBASE}/znc/configs/
@owner
@group
@bin bin/znc
bin/znc-buildmod
include/znc/
@ -92,6 +102,7 @@ lib/znc/
@so lib/znc/webadmin.so
@man man/man1/znc-buildmod.1
@man man/man1/znc.1
share/doc/pkg-readmes/${PKGSTEM}
share/znc/
share/znc/cmake/
share/znc/cmake/ZNCConfig.cmake

1
net/znc/pkg/PLIST-sasl Normal file
View File

@ -0,0 +1 @@
@so lib/znc/cyrusauth.so

11
net/znc/pkg/README-main Normal file
View File

@ -0,0 +1,11 @@
+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------
Configuration file
==================
The default configuration file for ZNC on OpenBSD is to be stored
at ${VARBASE}/znc/configs/znc.conf and can be created interactively by
$ su -s /bin/ksh _znc -c "${LOCALBASE}/bin/znc -d ${VARBASE}/znc --makeconf"

11
net/znc/pkg/znc.rc Normal file
View File

@ -0,0 +1,11 @@
#!/bin/ksh
daemon="${PREFIX}/bin/znc"
daemon_flags="-d ${VARBASE}/znc"
daemon_user="_znc"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1