Hi,
Thanks for the comments.
> There's a specific reason to package the sasl functionality into a
> subpackage? Does the main package still works without the -sasl
> subpackage installed?
Yes the main package works without the subpackage. Didn't add it to
main package mostly because not everyone wants sasl and we have a
history of making sasl packages/flavors separately.
> I don't have a strong opinion, but I think we can live without the
> PSEUDO_FLAVORS for this one.
I think its easier without the pseudo flavors too, so I removed that.
Updated patch with comments addressed.
Thanks,
Aisha
diff --git a/infrastructure/db/user.list b/infrastructure/db/user.list
index 5f8e47e8b41..2af4ac17d2f 100644
--- a/infrastructure/db/user.list
+++ b/infrastructure/db/user.list
@@ -385,3 +385,4 @@ id user group port
874 _snowflakeproxy _snowflakeproxy net/snowflake_proxy
875 _guacd _guacd net/guacamole/server
876 _shairport _shairport audio/shairport-sync
+877 _znc _znc net/znc
diff --git a/net/znc/Makefile b/net/znc/Makefile
index b6d42ba7558..7cac9bc9136 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-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-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
+
+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>
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 96%
rename from net/znc/pkg/PLIST
rename to net/znc/pkg/PLIST-main
index fa26e73f141..90b9f0ce52e 100644
--- a/net/znc/pkg/PLIST
+++ b/net/znc/pkg/PLIST-main
@@ -1,3 +1,13 @@
+@pkgpath net/znc
+@newgroup _znc:877
+@newuser _znc:877:877: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 +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
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..2cd1c11daba
--- /dev/null
+++ b/net/znc/pkg/README-main
@@ -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"
diff --git a/net/znc/pkg/znc.rc b/net/znc/pkg/znc.rc
new file mode 100644
index 00000000000..c32f8e82604
--- /dev/null
+++ b/net/znc/pkg/znc.rc
@@ -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
No comments:
Post a Comment