On 22/03/17 08:56PM, Brad Smith wrote:
> On 3/17/2022 8:07 PM, aisha wrote:
> > On 22/02/26 01:14PM, aisha wrote:
> > > Hi,
> > > I've had a need to add the sasl functionality for ZNC
> > > so I added it as a multi package.
> > >
> > > This is my first time making a multi package so I'm not
> > > super sure if I've done everything correctly.
> > > I've checked with portcheck and port-lib-depends-check
> > > and they seem to be happy.
> > >
> > > While here, I've also added a dedicated user for ZNC
> > > and a service file, as well as a small README to tell
> > > how and where to create the config files.
> > >
> > > Best,
> > > Aisha
ping reattached updated patch
diff --git a/infrastructure/db/user.list b/infrastructure/db/user.list
index c19a1052206..491cf421e06 100644
--- a/infrastructure/db/user.list
+++ b/infrastructure/db/user.list
@@ -384,3 +384,4 @@ id user group port
873 _alertmanager _alertmanager sysutils/alertmanager
874 _snowflakeproxy _snowflakeproxy net/snowflake_proxy
875 _guacd _guacd net/guacamole/server
+876 _znc _znc net/znc
diff --git a/net/znc/Makefile b/net/znc/Makefile
index b6d42ba7558..e6858ab8612 100644
--- a/net/znc/Makefile
+++ b/net/znc/Makefile
@@ -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= 3
HOMEPAGE= https://znc.in/
@@ -12,19 +13,29 @@ 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
+PSEDUO_FLAVORS= no_sasl
+
+WANTLIB-common= crypto icuuc icudata m pthread ssl z ${COMPILER_LIBCXX}
+WANTLIB= c ${WANTLIB-common}
+WANTLIB-sasl= sasl2 ${WANTLIB-common}
LIB_DEPENDS= textproc/icu4c
+LIB_DEPENDS-sasl= ${LIB_DEPENDS} \
+ security/cyrus-sasl2
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
.include <bsd.port.mk>
+
+.if !${BUILD_PACKAGES:M-sasl}
+CONFIGURE_ARGS+= -DWANT_CYRUS=NO
+.endif
diff --git a/net/znc/pkg/DESCR b/net/znc/pkg/DESCR-main
similarity index 100%
rename from net/znc/pkg/DESCR
rename to net/znc/pkg/DESCR-main
diff --git a/net/znc/pkg/DESCR-sasl b/net/znc/pkg/DESCR-sasl
new file mode 100644
index 00000000000..26aad0d36f8
--- /dev/null
+++ b/net/znc/pkg/DESCR-sasl
@@ -0,0 +1 @@
+SASL module for ZNC
diff --git a/net/znc/pkg/PLIST b/net/znc/pkg/PLIST-main
similarity index 97%
rename from net/znc/pkg/PLIST
rename to net/znc/pkg/PLIST-main
index fa26e73f141..681461a0cc1 100644
--- a/net/znc/pkg/PLIST
+++ b/net/znc/pkg/PLIST-main
@@ -1,3 +1,12 @@
+@newgroup _znc:876
+@newuser _znc:876:876:daemon:ZNC Daemon:/nonexistent:/sbin/nologin
+@rcscript ${RCDIR}/znc
+@owner _znc
+@group _znc
+@sample /var/znc/
+@sample /var/znc/configs/
+@owner
+@group
@bin bin/znc
bin/znc-buildmod
include/znc/
@@ -92,6 +101,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
diff --git a/net/znc/pkg/PLIST-sasl b/net/znc/pkg/PLIST-sasl
new file mode 100644
index 00000000000..8fabc5365e2
--- /dev/null
+++ b/net/znc/pkg/PLIST-sasl
@@ -0,0 +1 @@
+@so lib/znc/cyrusauth.so
diff --git a/net/znc/pkg/README-main b/net/znc/pkg/README-main
new file mode 100644
index 00000000000..55bf39e73dd
--- /dev/null
+++ b/net/znc/pkg/README-main
@@ -0,0 +1,12 @@
++--------------------------
++ Running ZNC on OpenBSD
++--------------------------
+
+Configuration file
+==================
+
+The default configuration file for ZNC on OpenBSD is to be stored
+at /var/znc/configs/znc.conf and can be created interactively by
+
+$ su -l -s /bin/ksh _znc
+$ znc -d /var/znc --makeconf
diff --git a/net/znc/pkg/znc.rc b/net/znc/pkg/znc.rc
new file mode 100644
index 00000000000..30bb831f0e3
--- /dev/null
+++ b/net/znc/pkg/znc.rc
@@ -0,0 +1,11 @@
+#!/bin/ksh
+
+daemon="${PREFIX}/bin/znc"
+daemon_flags="-d /var/znc"
+daemon_user="_znc"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1
No comments:
Post a Comment