1 # $NetBSD: options.mk,v 1.29 2012/02/01 08:30:39 sbd Exp $
3 # Recommended package options for various setups:
5 # Standalone Samba server cups
6 # Domain Member server cups ldap winbind
7 # Active Directory Member server ads cups winbind
8 # Domain Controller ldap winbind
10 PKG_OPTIONS_VAR
= PKG_OPTIONS.samba
11 PKG_SUPPORTED_OPTIONS
= ads cups fam ldap pam winbind
12 PKG_SUGGESTED_OPTIONS
= ads ldap pam winbind
14 .
include "../../mk/bsd.fast.prefs.mk"
16 SAMBA_ACL_OPSYS
= AIX Darwin FreeBSD HPUX IRIX Linux OSF1 SunOS
17 .if
!empty
(SAMBA_ACL_OPSYS
:M
${OPSYS})
18 PKG_SUPPORTED_OPTIONS
+= acl
21 .
include "../../mk/bsd.options.mk"
23 SAMBA_STATIC_MODULES
:= # empty
26 ### Allow Samba to join as a member server of an Active Directory domain.
28 .if
!empty
(PKG_OPTIONS
:Mads
)
29 .
include "../../mk/krb5.buildlink3.mk"
30 . if empty
(PKG_OPTIONS
:Mldap
)
33 CONFIGURE_ARGS
+= --with-ads
34 CONFIGURE_ARGS
+= --with-krb5
=${KRB5BASE}
36 # Avoid build failures with recent version of Heimdal under NetBSD.
37 . if
${OPSYS} == "NetBSD"
38 CONFIGURE_ENV
+= samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER
=no
41 # ignore gssapi.h on Solaris as it conflicts with <gssapi/gssapi.h>
42 . if
${OPSYS} == "SunOS"
43 CONFIGURE_ENV
+= ac_cv_header_gssapi_h
=no
46 CONFIGURE_ARGS
+= --without-ads
47 CONFIGURE_ARGS
+= --without-krb5
51 ### Access Control List support.
53 .if
!empty
(PKG_OPTIONS
:Macl
)
54 CONFIGURE_ARGS
+= --with-acl-support
58 ### Native CUPS support for providing printing services.
61 .if
!empty
(PKG_OPTIONS
:Mcups
)
62 .
include "../../print/cups/buildlink3.mk"
63 CONFIGURE_ARGS
+= --enable-cups
65 INSTALLATION_DIRS
+= libexec
/cups
/backend
67 .PHONY
: samba-cups-install
68 post-install
: samba-cups-install
70 cd
${DESTDIR}${PREFIX}/libexec
/cups
/backend
&& \
71 ${LN} -fs ..
/..
/..
/bin
/smbspool smb
73 CONFIGURE_ARGS
+= --disable-cups
77 ### Access Control List support.
80 .if
!empty
(PKG_OPTIONS
:Mfam
)
81 .
include "../../mk/fam.buildlink3.mk"
82 CONFIGURE_ARGS
+= --enable-fam
85 CONFIGURE_ARGS
+= --disable-fam
89 ### Support LDAP authentication and storage of Samba account information.
91 .if
!empty
(PKG_OPTIONS
:Mldap
)
92 .
include "../../databases/openldap-client/buildlink3.mk"
93 CONFIGURE_ARGS
+= --with-ldap
95 CONFIGURE_ARGS
+= --without-ldap
99 ### Support PAM authentication and build smbpass and winbind PAM modules.
102 .if
!empty
(PKG_OPTIONS
:Mpam
)
103 .
include "../../security/PAM/module.mk"
104 CONFIGURE_ARGS
+= --with-pam
105 CONFIGURE_ARGS
+= --with-pam_smbpass
106 CONFIGURE_ARGS
+= --with-pammodulesdir
=${PAM_INSTMODULEDIR}
108 INSTALLATION_DIRS
+= ${EGDIR}/pam_smbpass
110 .PHONY
: samba-pam-smbpass-install
111 post-install
: samba-pam-smbpass-install
112 samba-pam-smbpass-install
:
113 ${INSTALL_DATA} ${WRKSRC}/pam_smbpass
/README \
114 ${DESTDIR}${PREFIX}/${DOCDIR}/README.pam_smbpass
115 cd
${WRKSRC}/pam_smbpass
/samples
; for f in
[a-z
]*; do \
116 ${INSTALL_DATA} $${f} \
117 ${DESTDIR}${PREFIX}/${EGDIR}/pam_smbpass
/$${f}; \
122 ### Support querying a PDC for domain user and group information, e.g.,
123 ### through NSS or PAM.
126 .if
!empty
(PKG_OPTIONS
:Mwinbind
)
127 CONFIGURE_ARGS
+= --with-winbind
129 SAMBA_STATIC_MODULES
:= ${SAMBA_STATIC_MODULES},idmap_rid
130 . if
!empty
(PKG_OPTIONS
:Mads
)
131 SAMBA_STATIC_MODULES
:= ${SAMBA_STATIC_MODULES},idmap_ad
134 WINBINDD_RCD_SCRIPT
= winbindd
137 # Install the NSS winbind module if it exists.
138 PLIST_SUBST
+= NSS_WINBIND
=${NSS_WINBIND
:Q
}
139 FILES_SUBST
+= NSS_WINBIND
=${NSS_WINBIND
:Q
}
140 NSS_WINBIND
= ${NSS_WINBIND_cmd
:sh
}
142 ${TEST} -x
${WRKSRC}/config.status || \
143 { ${ECHO} "@comment no NSS winbind module" ; exit
0; }; \
144 cd
${WRKDIR} && ${ECHO} @WINBIND_NSS@ | \
145 ${WRKSRC}/config.status
--file
=-:- | \
146 ${AWK} '/^$$/ { print "@comment no NSS winbind module"; exit 0; } \
147 { sub(".*/", "lib/"); print; }' && \
150 # Install a /usr/lib/${NSS_WINBIND:T} -> ${PREFIX}/${NSS_WINBIND} symlink
151 # Unfortunately NSS_WINDIND_cmd can not be used to determine whether the
152 # (de)install templates are needed or not.
153 INSTALL_TEMPLATES
+= INSTALL.nss_winbind
154 DEINSTALL_TEMPLATES
+= DEINSTALL.nss_winbind
156 .PHONY
: samba-nss-winbind-install
157 post-install
: samba-nss-winbind-install
158 samba-nss-winbind-install
:
159 lib
=${WRKDIR}/${DISTNAME}/nsswitch
/${NSS_WINBIND
:T
:Q
}; \
160 ${TEST} ! -f
$$lib ||
${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib
162 # Install the NSS WINS module if it exists.
163 PLIST_SUBST
+= NSS_WINS
=${NSS_WINS
:Q
}
164 NSS_WINS
= ${NSS_WINS_cmd
:sh
}
166 ${TEST} -x
${WRKSRC}/config.status || \
167 { ${ECHO} "@comment no NSS WINS module" ; exit
0; }; \
168 cd
${WRKDIR} && ${ECHO} @WINBIND_WINS_NSS@ | \
169 ${WRKSRC}/config.status
--file
=-:- | \
170 ${AWK} '/^$$/ { print "@comment no NSS WINS module"; exit 0; } \
171 { sub(".*/", "lib/"); print; }' && \
174 .PHONY
: samba-nss-wins-install
175 post-install
: samba-nss-wins-install
176 samba-nss-wins-install
:
177 lib
=${WRKDIR}/${DISTNAME}/nsswitch
/${NSS_WINS
:T
:Q
}; \
178 ${TEST} ! -f
$$lib ||
${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib
180 CONFIGURE_ARGS
+= --without-winbind
181 PLIST_SUBST
+= NSS_WINBIND
="no NSS winbind module"
182 PLIST_SUBST
+= NSS_WINS
="no NSS WINS module"
186 ### Add the optional static modules to the configuration.
188 .if
!empty
(SAMBA_STATIC_MODULES
)
189 CONFIGURE_ARGS
+= --with-static-modules
=${SAMBA_STATIC_MODULES
:S
/^
,//}