| @@ -1,191 +1,193 @@ | | | @@ -1,191 +1,193 @@ |
1 | # $NetBSD: options.mk,v 1.35 2016/02/25 16:20:52 jperkin Exp $ | | 1 | # $NetBSD: options.mk,v 1.36 2016/03/18 12:28:21 jperkin Exp $ |
2 | | | 2 | |
3 | # Recommended package options for various setups: | | 3 | # Recommended package options for various setups: |
4 | # | | 4 | # |
5 | # Standalone Samba server cups | | 5 | # Standalone Samba server cups |
6 | # Domain Member server cups ldap winbind | | 6 | # Domain Member server cups ldap winbind |
7 | # Active Directory Member server ads cups winbind | | 7 | # Active Directory Member server ads cups winbind |
8 | # Domain Controller ldap winbind | | 8 | # Domain Controller ldap winbind |
9 | # | | 9 | # |
10 | PKG_OPTIONS_VAR= PKG_OPTIONS.samba | | 10 | PKG_OPTIONS_VAR= PKG_OPTIONS.samba |
11 | PKG_SUPPORTED_OPTIONS= ads cups fam ldap pam winbind | | 11 | PKG_SUPPORTED_OPTIONS= ads cups fam ldap pam winbind |
12 | PKG_SUGGESTED_OPTIONS= ldap pam winbind | | 12 | PKG_SUGGESTED_OPTIONS= ldap pam winbind |
13 | | | 13 | |
14 | .include "../../mk/bsd.fast.prefs.mk" | | 14 | .include "../../mk/bsd.fast.prefs.mk" |
15 | | | 15 | |
16 | SAMBA_ACL_OPSYS= AIX Darwin FreeBSD HPUX IRIX Linux OSF1 SunOS | | 16 | SAMBA_ACL_OPSYS= AIX Darwin FreeBSD HPUX IRIX Linux OSF1 SunOS |
17 | .if !empty(SAMBA_ACL_OPSYS:M${OPSYS}) | | 17 | .if !empty(SAMBA_ACL_OPSYS:M${OPSYS}) |
18 | PKG_SUPPORTED_OPTIONS+= acl | | 18 | PKG_SUPPORTED_OPTIONS+= acl |
19 | .endif | | 19 | .endif |
20 | | | 20 | |
21 | .if empty(MACHINE_PLATFORM:MDarwin-1[1-9].*) | | 21 | .if empty(MACHINE_PLATFORM:MDarwin-1[1-9].*) |
22 | PKG_SUGGESTED_OPTIONS+= ads | | 22 | PKG_SUGGESTED_OPTIONS+= ads |
23 | .endif | | 23 | .endif |
24 | | | 24 | |
25 | .include "../../mk/bsd.options.mk" | | 25 | .include "../../mk/bsd.options.mk" |
26 | | | 26 | |
27 | SAMBA_STATIC_MODULES:= # empty | | 27 | SAMBA_STATIC_MODULES:= # empty |
28 | | | 28 | |
29 | ### | | 29 | ### |
30 | ### Allow Samba to join as a member server of an Active Directory domain. | | 30 | ### Allow Samba to join as a member server of an Active Directory domain. |
31 | ### | | 31 | ### |
32 | .if !empty(PKG_OPTIONS:Mads) | | 32 | .if !empty(PKG_OPTIONS:Mads) |
33 | . include "../../mk/krb5.buildlink3.mk" | | 33 | . include "../../mk/krb5.buildlink3.mk" |
34 | . if empty(PKG_OPTIONS:Mldap) | | 34 | . if empty(PKG_OPTIONS:Mldap) |
35 | PKG_OPTIONS+= ldap | | 35 | PKG_OPTIONS+= ldap |
36 | . endif | | 36 | . endif |
37 | CONFIGURE_ARGS+= --with-ads | | 37 | CONFIGURE_ARGS+= --with-ads |
38 | CONFIGURE_ARGS+= --with-krb5=${KRB5BASE} | | 38 | CONFIGURE_ARGS+= --with-krb5=${KRB5BASE} |
39 | | | 39 | |
40 | # Avoid build failures with recent version of Heimdal under NetBSD. | | 40 | # Avoid build failures with recent version of Heimdal under NetBSD. |
41 | CONFIGURE_ENV.NetBSD+= samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no | | 41 | CONFIGURE_ENV.NetBSD+= samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no |
42 | | | 42 | |
43 | # ignore gssapi.h on Solaris as it conflicts with <gssapi/gssapi.h> | | 43 | # ignore gssapi.h on Solaris as it conflicts with <gssapi/gssapi.h> |
44 | CONFIGURE_ENV.SunOS+= ac_cv_header_gssapi_h=no | | 44 | CONFIGURE_ENV.SunOS+= ac_cv_header_gssapi_h=no |
45 | .else | | 45 | .else |
46 | CONFIGURE_ARGS+= --without-ads | | 46 | CONFIGURE_ARGS+= --without-ads |
47 | CONFIGURE_ARGS+= --without-krb5 | | 47 | CONFIGURE_ARGS+= --without-krb5 |
48 | .endif | | 48 | .endif |
49 | | | 49 | |
50 | ### | | 50 | ### |
51 | ### Access Control List support. | | 51 | ### Access Control List support. |
52 | ### | | 52 | ### |
53 | .if !empty(PKG_OPTIONS:Macl) | | 53 | .if !empty(PKG_OPTIONS:Macl) |
54 | CONFIGURE_ARGS+= --with-acl-support | | 54 | CONFIGURE_ARGS+= --with-acl-support |
55 | .endif | | 55 | .endif |
56 | | | 56 | |
57 | ### | | 57 | ### |
58 | ### Native CUPS support for providing printing services. | | 58 | ### Native CUPS support for providing printing services. |
59 | ### | | 59 | ### |
60 | PLIST_VARS+= cups | | 60 | PLIST_VARS+= cups |
61 | .if !empty(PKG_OPTIONS:Mcups) | | 61 | .if !empty(PKG_OPTIONS:Mcups) |
62 | . include "../../print/cups15/buildlink3.mk" | | 62 | . include "../../print/cups15/buildlink3.mk" |
63 | CONFIGURE_ARGS+= --enable-cups | | 63 | CONFIGURE_ARGS+= --enable-cups |
64 | PLIST.cups= yes | | 64 | PLIST.cups= yes |
65 | INSTALLATION_DIRS+= libexec/cups/backend | | 65 | INSTALLATION_DIRS+= libexec/cups/backend |
66 | | | 66 | |
67 | .PHONY: samba-cups-install | | 67 | .PHONY: samba-cups-install |
68 | post-install: samba-cups-install | | 68 | post-install: samba-cups-install |
69 | samba-cups-install: | | 69 | samba-cups-install: |
70 | cd ${DESTDIR}${PREFIX}/libexec/cups/backend && \ | | 70 | cd ${DESTDIR}${PREFIX}/libexec/cups/backend && \ |
71 | ${LN} -fs ../../../bin/smbspool smb | | 71 | ${LN} -fs ../../../bin/smbspool smb |
72 | .else | | 72 | .else |
73 | CONFIGURE_ARGS+= --disable-cups | | 73 | CONFIGURE_ARGS+= --disable-cups |
74 | .endif | | 74 | .endif |
75 | | | 75 | |
76 | ### | | 76 | ### |
77 | ### File Alteration Monitor support. | | 77 | ### File Alteration Monitor support. |
78 | ### | | 78 | ### |
79 | PLIST_VARS+= fam | | 79 | PLIST_VARS+= fam |
80 | .if !empty(PKG_OPTIONS:Mfam) | | 80 | .if !empty(PKG_OPTIONS:Mfam) |
81 | . include "../../mk/fam.buildlink3.mk" | | 81 | . include "../../mk/fam.buildlink3.mk" |
82 | CONFIGURE_ARGS+= --enable-fam | | 82 | CONFIGURE_ARGS+= --enable-fam |
83 | PLIST.fam= yes | | 83 | PLIST.fam= yes |
84 | .else | | 84 | .else |
85 | CONFIGURE_ARGS+= --disable-fam | | 85 | CONFIGURE_ARGS+= --disable-fam |
86 | .endif | | 86 | .endif |
87 | | | 87 | |
88 | ### | | 88 | ### |
89 | ### Support LDAP authentication and storage of Samba account information. | | 89 | ### Support LDAP authentication and storage of Samba account information. |
90 | ### | | 90 | ### |
91 | .if !empty(PKG_OPTIONS:Mldap) | | 91 | .if !empty(PKG_OPTIONS:Mldap) |
92 | . include "../../databases/openldap-client/buildlink3.mk" | | 92 | . include "../../databases/openldap-client/buildlink3.mk" |
93 | CONFIGURE_ARGS+= --with-ldap | | 93 | CONFIGURE_ARGS+= --with-ldap |
94 | .else | | 94 | .else |
95 | CONFIGURE_ARGS+= --without-ldap | | 95 | CONFIGURE_ARGS+= --without-ldap |
96 | .endif | | 96 | .endif |
97 | | | 97 | |
98 | ### | | 98 | ### |
99 | ### Support PAM authentication and build smbpass and winbind PAM modules. | | 99 | ### Support PAM authentication and build smbpass and winbind PAM modules. |
100 | ### | | 100 | ### |
101 | PLIST_VARS+= pam | | 101 | PLIST_VARS+= pam |
102 | .if !empty(PKG_OPTIONS:Mpam) | | 102 | .if !empty(PKG_OPTIONS:Mpam) |
103 | . include "../../mk/pam.buildlink3.mk" | | 103 | . include "../../mk/pam.buildlink3.mk" |
104 | | | 104 | |
105 | CONFIGURE_ARGS+= --with-pam | | 105 | CONFIGURE_ARGS+= --with-pam |
106 | CONFIGURE_ARGS+= --with-pam_smbpass | | 106 | CONFIGURE_ARGS+= --with-pam_smbpass |
107 | CONFIGURE_ARGS+= --with-pammodulesdir=${PREFIX}/lib/security | | 107 | CONFIGURE_ARGS+= --with-pammodulesdir=${PREFIX}/lib/security |
108 | PLIST.pam= yes | | 108 | PLIST.pam= yes |
109 | INSTALLATION_DIRS+= ${EGDIR}/pam_smbpass | | 109 | INSTALLATION_DIRS+= ${EGDIR}/pam_smbpass |
110 | | | 110 | |
111 | .PHONY: samba-pam-smbpass-install | | 111 | .PHONY: samba-pam-smbpass-install |
112 | post-install: samba-pam-smbpass-install | | 112 | post-install: samba-pam-smbpass-install |
113 | samba-pam-smbpass-install: | | 113 | samba-pam-smbpass-install: |
114 | ${INSTALL_DATA} ${WRKSRC}/pam_smbpass/README \ | | 114 | ${INSTALL_DATA} ${WRKSRC}/pam_smbpass/README \ |
115 | ${DESTDIR}${PREFIX}/${DOCDIR}/README.pam_smbpass | | 115 | ${DESTDIR}${PREFIX}/${DOCDIR}/README.pam_smbpass |
116 | cd ${WRKSRC}/pam_smbpass/samples; for f in [a-z]*; do \ | | 116 | cd ${WRKSRC}/pam_smbpass/samples; for f in [a-z]*; do \ |
117 | ${INSTALL_DATA} $${f} \ | | 117 | ${INSTALL_DATA} $${f} \ |
118 | ${DESTDIR}${PREFIX}/${EGDIR}/pam_smbpass/$${f}; \ | | 118 | ${DESTDIR}${PREFIX}/${EGDIR}/pam_smbpass/$${f}; \ |
119 | done | | 119 | done |
120 | .endif | | 120 | .endif |
121 | | | 121 | |
122 | ### | | 122 | ### |
123 | ### Support querying a PDC for domain user and group information, e.g., | | 123 | ### Support querying a PDC for domain user and group information, e.g., |
124 | ### through NSS or PAM. | | 124 | ### through NSS or PAM. |
125 | ### | | 125 | ### |
126 | PLIST_VARS+= winbind | | 126 | PLIST_VARS+= winbind |
127 | .if !empty(PKG_OPTIONS:Mwinbind) | | 127 | .if !empty(PKG_OPTIONS:Mwinbind) |
128 | CONFIGURE_ARGS+= --with-winbind | | 128 | CONFIGURE_ARGS+= --with-winbind |
129 | | | 129 | |
130 | SAMBA_STATIC_MODULES:= ${SAMBA_STATIC_MODULES},idmap_rid | | 130 | SAMBA_STATIC_MODULES:= ${SAMBA_STATIC_MODULES},idmap_rid |
131 | . if !empty(PKG_OPTIONS:Mads) | | 131 | . if !empty(PKG_OPTIONS:Mads) |
132 | SAMBA_STATIC_MODULES:= ${SAMBA_STATIC_MODULES},idmap_ad | | 132 | SAMBA_STATIC_MODULES:= ${SAMBA_STATIC_MODULES},idmap_ad |
133 | . endif | | 133 | . endif |
134 | | | 134 | |
135 | WINBINDD_RCD_SCRIPT= winbindd | | 135 | WINBINDD_RCD_SCRIPT= winbindd |
136 | PLIST.winbind= yes | | 136 | PLIST.winbind= yes |
137 | | | 137 | |
138 | # Install the NSS winbind module if it exists. | | 138 | # Install the NSS winbind module if it exists. |
139 | PLIST_SUBST+= NSS_WINBIND=${NSS_WINBIND:Q} | | 139 | PLIST_SUBST+= NSS_WINBIND=${NSS_WINBIND:Q} |
140 | FILES_SUBST+= NSS_WINBIND=${NSS_WINBIND:Q} | | 140 | FILES_SUBST+= NSS_WINBIND=${NSS_WINBIND:Q} |
141 | NSS_WINBIND= ${NSS_WINBIND_cmd:sh} | | 141 | NSS_WINBIND= ${NSS_WINBIND_cmd:sh} |
142 | NSS_WINBIND_cmd= \ | | 142 | NSS_WINBIND_cmd= \ |
143 | ${TEST} -x ${WRKSRC}/config.status || \ | | 143 | ${TEST} -x ${WRKSRC}/config.status || \ |
144 | { ${ECHO} "@comment no NSS winbind module" ; exit 0; }; \ | | 144 | { ${ECHO} "@comment no NSS winbind module" ; exit 0; }; \ |
145 | cd ${WRKDIR} && ${ECHO} @WINBIND_NSS@ | \ | | 145 | cd ${WRKDIR} && ${ECHO} @WINBIND_NSS@ | \ |
146 | ${WRKSRC}/config.status --file=-:- | \ | | 146 | ${WRKSRC}/config.status --file=-:- | \ |
147 | ${AWK} '/^$$/ { print "@comment no NSS winbind module"; exit 0; } \ | | 147 | ${AWK} '/^$$/ { print "@comment no NSS winbind module"; exit 0; } \ |
148 | { sub(".*/", "lib/"); print; }' && \ | | 148 | { sub(".*/", "lib/"); print; }' && \ |
149 | ${RM} -f config.log | | 149 | ${RM} -f config.log |
150 | | | 150 | |
151 | # Install a /usr/lib/${NSS_WINBIND:T} -> ${PREFIX}/${NSS_WINBIND} symlink | | 151 | # Install a /usr/lib/${NSS_WINBIND:T} -> ${PREFIX}/${NSS_WINBIND} symlink |
152 | # Unfortunately NSS_WINDIND_cmd can not be used to determine whether the | | 152 | # Unfortunately NSS_WINDIND_cmd can not be used to determine whether the |
153 | # (de)install templates are needed or not. | | 153 | # (de)install templates are needed or not. |
| | | 154 | .if ${OS_VARIANT} != "SmartOS" |
154 | INSTALL_TEMPLATES+= INSTALL.nss_winbind | | 155 | INSTALL_TEMPLATES+= INSTALL.nss_winbind |
155 | DEINSTALL_TEMPLATES+= DEINSTALL.nss_winbind | | 156 | DEINSTALL_TEMPLATES+= DEINSTALL.nss_winbind |
| | | 157 | .endif |
156 | | | 158 | |
157 | .PHONY: samba-nss-winbind-install | | 159 | .PHONY: samba-nss-winbind-install |
158 | post-install: samba-nss-winbind-install | | 160 | post-install: samba-nss-winbind-install |
159 | samba-nss-winbind-install: | | 161 | samba-nss-winbind-install: |
160 | lib=${WRKDIR}/${DISTNAME}/nsswitch/${NSS_WINBIND:T:Q}; \ | | 162 | lib=${WRKDIR}/${DISTNAME}/nsswitch/${NSS_WINBIND:T:Q}; \ |
161 | ${TEST} ! -f $$lib || ${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib | | 163 | ${TEST} ! -f $$lib || ${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib |
162 | | | 164 | |
163 | # Install the NSS WINS module if it exists. | | 165 | # Install the NSS WINS module if it exists. |
164 | PLIST_SUBST+= NSS_WINS=${NSS_WINS:Q} | | 166 | PLIST_SUBST+= NSS_WINS=${NSS_WINS:Q} |
165 | NSS_WINS= ${NSS_WINS_cmd:sh} | | 167 | NSS_WINS= ${NSS_WINS_cmd:sh} |
166 | NSS_WINS_cmd= \ | | 168 | NSS_WINS_cmd= \ |
167 | ${TEST} -x ${WRKSRC}/config.status || \ | | 169 | ${TEST} -x ${WRKSRC}/config.status || \ |
168 | { ${ECHO} "@comment no NSS WINS module" ; exit 0; }; \ | | 170 | { ${ECHO} "@comment no NSS WINS module" ; exit 0; }; \ |
169 | cd ${WRKDIR} && ${ECHO} @WINBIND_WINS_NSS@ | \ | | 171 | cd ${WRKDIR} && ${ECHO} @WINBIND_WINS_NSS@ | \ |
170 | ${WRKSRC}/config.status --file=-:- | \ | | 172 | ${WRKSRC}/config.status --file=-:- | \ |
171 | ${AWK} '/^$$/ { print "@comment no NSS WINS module"; exit 0; } \ | | 173 | ${AWK} '/^$$/ { print "@comment no NSS WINS module"; exit 0; } \ |
172 | { sub(".*/", "lib/"); print; }' && \ | | 174 | { sub(".*/", "lib/"); print; }' && \ |
173 | ${RM} -f config.log | | 175 | ${RM} -f config.log |
174 | | | 176 | |
175 | .PHONY: samba-nss-wins-install | | 177 | .PHONY: samba-nss-wins-install |
176 | post-install: samba-nss-wins-install | | 178 | post-install: samba-nss-wins-install |
177 | samba-nss-wins-install: | | 179 | samba-nss-wins-install: |
178 | lib=${WRKDIR}/${DISTNAME}/nsswitch/${NSS_WINS:T:Q}; \ | | 180 | lib=${WRKDIR}/${DISTNAME}/nsswitch/${NSS_WINS:T:Q}; \ |
179 | ${TEST} ! -f $$lib || ${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib | | 181 | ${TEST} ! -f $$lib || ${INSTALL_LIB} $$lib ${DESTDIR}${PREFIX}/lib |
180 | .else | | 182 | .else |
181 | CONFIGURE_ARGS+= --without-winbind | | 183 | CONFIGURE_ARGS+= --without-winbind |
182 | PLIST_SUBST+= NSS_WINBIND="no NSS winbind module" | | 184 | PLIST_SUBST+= NSS_WINBIND="no NSS winbind module" |
183 | PLIST_SUBST+= NSS_WINS="no NSS WINS module" | | 185 | PLIST_SUBST+= NSS_WINS="no NSS WINS module" |
184 | .endif | | 186 | .endif |
185 | | | 187 | |
186 | ### | | 188 | ### |
187 | ### Add the optional static modules to the configuration. | | 189 | ### Add the optional static modules to the configuration. |
188 | ### | | 190 | ### |
189 | .if !empty(SAMBA_STATIC_MODULES) | | 191 | .if !empty(SAMBA_STATIC_MODULES) |
190 | CONFIGURE_ARGS+= --with-static-modules=${SAMBA_STATIC_MODULES:S/^,//} | | 192 | CONFIGURE_ARGS+= --with-static-modules=${SAMBA_STATIC_MODULES:S/^,//} |
191 | .endif | | 193 | .endif |