From e7c0c6c61bd9ab1e4b20ab50c31a8ccf8c195777 Mon Sep 17 00:00:00 2001 From: tnn Date: Sun, 8 Mar 2020 12:39:27 +0000 Subject: samba4: make avahi optional Avahi by default pulls in X11 via gtk2 and dbus, so you might want to disable it on a small server if your clients don't need ZeroConf capability. --- net/samba4/Makefile | 3 +-- net/samba4/PLIST | 6 +++--- net/samba4/options.mk | 20 ++++++++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/net/samba4/Makefile b/net/samba4/Makefile index af9be2dcf59..485bcb54af4 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.90 2020/01/29 12:44:14 adam Exp $ +# $NetBSD: Makefile,v 1.91 2020/03/08 12:39:27 tnn Exp $ DISTNAME= samba-4.11.6 CATEGORIES= net @@ -218,7 +218,6 @@ BUILDLINK_API_DEPENDS.talloc+= talloc>=2.2.0 .include "../../devel/zlib/buildlink3.mk" .include "../../lang/python/application.mk" .include "../../lang/python/extension.mk" -.include "../../net/avahi/buildlink3.mk" .include "../../security/gnutls/buildlink3.mk" .include "../../security/libgcrypt/buildlink3.mk" .include "../../textproc/jansson/buildlink3.mk" diff --git a/net/samba4/PLIST b/net/samba4/PLIST index c9c0dee2660..7079f1cf24a 100644 --- a/net/samba4/PLIST +++ b/net/samba4/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.26 2020/01/29 12:44:14 adam Exp $ +@comment $NetBSD: PLIST,v 1.27 2020/03/08 12:39:27 tnn Exp $ bin/cifsdd bin/dbwrap_tool bin/dumpmscat @@ -760,7 +760,7 @@ lib/samba/vfs/recycle.${SOEXT} lib/samba/vfs/shadow_copy.${SOEXT} lib/samba/vfs/shadow_copy2.${SOEXT} lib/samba/vfs/shell_snap.${SOEXT} -lib/samba/vfs/snapper.${SOEXT} +${PLIST.dbus}lib/samba/vfs/snapper.${SOEXT} lib/samba/vfs/streams_depot.${SOEXT} lib/samba/vfs/streams_xattr.${SOEXT} lib/samba/vfs/syncops.${SOEXT} @@ -858,7 +858,7 @@ man/man8/vfs_recycle.8 man/man8/vfs_shadow_copy.8 man/man8/vfs_shadow_copy2.8 man/man8/vfs_shell_snap.8 -man/man8/vfs_snapper.8 +${PLIST.dbus}man/man8/vfs_snapper.8 man/man8/vfs_streams_depot.8 man/man8/vfs_streams_xattr.8 man/man8/vfs_syncops.8 diff --git a/net/samba4/options.mk b/net/samba4/options.mk index db1f55c088a..805c25d973e 100644 --- a/net/samba4/options.mk +++ b/net/samba4/options.mk @@ -1,8 +1,8 @@ -# $NetBSD: options.mk,v 1.8 2019/06/22 16:11:49 jmcneill Exp $ +# $NetBSD: options.mk,v 1.9 2020/03/08 12:39:27 tnn Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.samba4 -PKG_SUPPORTED_OPTIONS= ads fam ldap pam winbind # cups # cups option is broken for me. -PKG_SUGGESTED_OPTIONS= ads ldap pam winbind +PKG_SUPPORTED_OPTIONS= ads avahi fam ldap pam winbind # cups # cups option is broken for me. +PKG_SUGGESTED_OPTIONS= ads avahi ldap pam winbind .include "../../mk/bsd.fast.prefs.mk" @@ -17,7 +17,7 @@ PKG_SUGGESTED_OPTIONS+= ads .include "../../mk/bsd.options.mk" -PLIST_VARS+= ads cups fam ldap pam winbind +PLIST_VARS+= ads cups dbus fam ldap pam winbind ### ### Access Control List support. @@ -98,3 +98,15 @@ WINBINDD_RCD_SCRIPT= winbindd .else CONFIGURE_ARGS+= --without-winbind .endif + +### +### Avahi DNS Service Discovery. +### +.if !empty(PKG_OPTIONS:Mavahi) +.include "../../net/avahi/buildlink3.mk" +# avahi also pulls in dbus, which affects whether the snapper module gets built +PLIST.dbus= yes +CONFIGURE_ARGS+= --enable-avahi +.else +CONFIGURE_ARGS+= --disable-avahi +.endif -- cgit v1.2.3