21 |
21 |
22 # |
22 # |
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
24 # |
24 # |
25 |
25 |
26 # Samba does not work properly on i86 when built by studio. |
26 # Samba does not work properly on i386 when built by studio with -xO3+. |
27 # Samba on SPARC has serious performance drop when built by gcc. |
27 ifeq ($(MACH), sparc) |
28 ifeq ($(uname -p),sparc) |
28 # parallelize up to 64 concurent tasks for sparc |
29 COMPILER = studio |
29 WAFOPT1 = -j64 |
30 else |
30 else |
31 COMPILER = gcc |
31 # Both SPRO_VROOT and studio_OPT vars must use the override keyword otherwise |
|
32 # Userland will ignore it and use its default value. |
|
33 # To use the older 12.3 compiler instead of the default 12.4 compiler uncomment |
|
34 # the following line. |
|
35 #override SPRO_VROOT = $(SPRO_ROOT)/solarisstudio12.3 |
|
36 override studio_OPT = -xO1 |
|
37 # parallelize up to 16 concurent tasks for i386 |
|
38 WAFOPT1 = -j16 |
32 endif |
39 endif |
33 |
40 |
34 # parfait seems to spin on us |
41 # parfait seems to spin on us |
35 export PARFAIT_BUILD=no |
42 export PARFAIT_BUILD=no |
36 |
43 |
37 include ../../../make-rules/shared-macros.mk |
44 include ../../../make-rules/shared-macros.mk |
38 |
45 |
39 COMPONENT_NAME= samba |
46 COMPONENT_NAME= samba |
40 COMPONENT_VERSION= 3.6.25 |
47 COMPONENT_VERSION= 4.1.17 |
41 TPNO= 21657 |
48 TPNO_SAMBA4= 20605 |
42 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
49 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
43 COMPONENT_PROJECT_URL= http://www.samba.org/ |
50 COMPONENT_PROJECT_URL= http://www.samba.org/ |
44 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
51 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
45 COMPONENT_ARCHIVE_HASH= sha256:8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 |
52 COMPONENT_ARCHIVE_HASH= sha256:7aeb5d09e9c84bbeeb4b98d33404e9dbc4d99c54e64a447cc9c4d57e9255cb1d |
46 COMPONENT_ARCHIVE_URL= http://ftp.samba.org/pub/samba/stable/$(COMPONENT_ARCHIVE) |
53 COMPONENT_ARCHIVE_URL= http://us1.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE) |
47 COMPONENT_BUGDB= utility/samba |
54 COMPONENT_BUGDB= utility/samba |
48 |
55 |
49 COMPONENT_NAME_1= docbook-xsl |
56 # It is not bad to have all the version/TPNO info on one place |
50 COMPONENT_VERSION_1= 1.76.1 |
57 # ...even if SAMBA36VERSION must be passed to Samba 3.6 make as a parameter |
51 COMPONENT_SRC_1= $(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1) |
58 SAMBA36VERSION= 3.6.25 |
52 COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.bz2 |
59 TPNO_SAMBA36= 21657 |
53 COMPONENT_ARCHIVE_HASH_1= \ |
60 PKG_MACROS += SAMBA36VERSION=$(SAMBA36VERSION) |
54 sha256:d6bdfd76f672c810299c71443e5127431ffb87d2c79d818aee72c86eaccd312c |
|
55 COMPONENT_ARCHIVE_URL_1= http://sourceforge.net/projects/docbook/files/$(COMPONENT_NAME_1)/$(COMPONENT_VERSION_1)/$(COMPONENT_ARCHIVE_1) |
|
56 |
61 |
57 include $(WS_MAKE_RULES)/prep.mk |
62 include $(WS_MAKE_RULES)/prep.mk |
58 |
63 |
59 SRC_OFFSET = source3 |
64 # waf |
60 # Now we override paths to .built |
65 WAF_PATH = PATH=$(BUILD_DIR)/samba/buildtools/bin:$(PROTO_DIR)/usr/bin:$$PATH |
61 BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/$(SRC_OFFSET) |
66 # Verbosed waf produces unreadable output if parallelized. |
62 BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)/$(SRC_OFFSET) |
67 # Uncomment to enable verbose build. |
63 |
68 #override WAFOPT1 = -v -j1 |
64 include $(WS_MAKE_RULES)/configure.mk |
69 |
|
70 # Set build dirs for Samba + Winbind / Winbind (without Samba). |
|
71 BUILD_DIR_SMB = $(BUILD_DIR)/samba |
|
72 BUILD_DIR_WINB = $(BUILD_DIR)/winbind |
|
73 |
65 include $(WS_MAKE_RULES)/ips.mk |
74 include $(WS_MAKE_RULES)/ips.mk |
66 |
75 |
67 CONFIGURE_SCRIPT = $(BUILD_DIR_$(BITS))/configure |
76 # directory to search for "include" in samba.p5m |
68 |
|
69 PKG_OPTIONS += -I $(COMPONENT_DIR) |
77 PKG_OPTIONS += -I $(COMPONENT_DIR) |
70 |
78 # Set the pkg... path to search files in ./Solaris/ dir (mainly the SMF manifests are there) |
71 DOCS-XML_DIR = $(SOURCE_DIR)/docs-xml |
79 PKG_PROTO_DIRS += $(COMPONENT_DIR) |
72 |
80 # Set the pkg... path for Samba 3.6.x objects built in separate (./samba36/) dir. |
73 # Build mozldap if not yet built. |
81 PKG_PROTO_DIRS += $(COMPONENT_DIR)/samba36/build/prototype/$(MACH) |
74 $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
82 |
75 $(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed: |
83 # Oracle HSM is not supported on 12.0 yet but the libsam.so target should rather be commented out than removed |
76 $(GMAKE) -C $(COMPONENT_DIR)/../mozldap install |
84 # (note) change compiler bitness here when Samba became 64bits |
77 |
85 #$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: Solaris/libsam.c |
78 # Clone mozldap libs and headers to $(PROTO_DIR). |
86 # $(MKDIR) $(@D) |
79 # Create also $(PROTO_DIR). |
87 # $(CC.studio.32) -m32 -G $(studio_PIC) -hlibsam.so Solaris/libsam.c \ |
80 $(PROTO_DIR)/.mozldap: $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
88 # -I$(COMPONENT_DIR)/Solaris/include \ |
81 $(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed |
89 # -o $@ |
82 $(MKDIR) $(PROTO_DIR) |
90 |
83 $(CLONEY) $(COMPONENT_DIR)/../mozldap/build/prototype/$(MACH) $(PROTO_DIR) |
91 # Samba 4 needs extension of krb5 API, which is implemented in a Samba private |
84 $(TOUCH) $@ |
92 # library libgssapi_krb5.so. Once MIT Kerberos is updated in Solaris 12 to |
85 |
93 # version 1.9 or higher this extension will no longer be needed |
86 # Solve dependencies before the 32bits configure. |
94 # see Bug 18308792 for details. |
87 $(BUILD_DIR_32)/.configured: $(DOCS-XML_DIR)/.built $(PROTO_DIR)/.mozldap \ |
95 $(PROTO_DIR)/usr/lib/samba/libgssapi_krb5.so: Solaris/dummy.c |
88 $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
96 $(MKDIR) $(@D) |
89 |
97 $(CC.studio.32) -m32 -G $(studio_PIC) -hlibgssapi_krb5.so Solaris/dummy.c \ |
90 # Start 64bits configure after the 32bits one is finished |
98 -R/usr/lib/gss \ |
91 # to have all dependecies solved. |
99 -M$(COMPONENT_DIR)/Solaris/gssapi_krb5-mapfile-vers \ |
92 $(BUILD_DIR_64)/.configured: $(BUILD_DIR_32)/.configured |
100 -o $@ |
93 |
101 |
94 # re-create configure dir with respect of SRC_OFFSET |
102 $(PROTO_DIR)/usr/lib/samba/$(MACH64)/libgssapi_krb5.so: Solaris/dummy.c |
95 # (target $(BUILD_DIR_64)/.configured does not know about |
103 $(MKDIR) $(@D) |
96 # the lower level of directories) |
104 $(CC.studio.64) -m64 -G $(studio_PIC) -hlibgssapi_krb5.so Solaris/dummy.c \ |
97 COMPONENT_PRE_CONFIGURE_ACTION = \ |
105 -R/usr/lib/gss/$(MACH64) \ |
98 $(RM) -r $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
106 -M$(COMPONENT_DIR)/Solaris/gssapi_krb5-mapfile-vers \ |
99 $(MKDIR) $(BUILD_DIR)/$(MACH$(BITS)) ; |
107 -o $@ |
100 |
108 |
101 # Clone SOURCE_DIR and remove links to all of the files generated |
109 $(PROTO_DIR)/usr/include/gssapi/gssapi_krb5.h: Solaris/gssapi_krb5.h |
102 # from *.in to distinguish then between the 32/64bits builds. |
110 $(MKDIR) $(@D) |
103 COMPONENT_PRE_CONFIGURE_ACTION += \ |
111 $(CP) Solaris/gssapi_krb5.h $@ |
104 ( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
112 |
105 find $(@D)/.. -name '*.in' | sed -e 's/.in$$//' | xargs $(RM) ) ; |
113 $(PROTO_DIR)/usr/bin/krb5-config: Solaris/krb5-config |
106 |
114 $(MKDIR) $(@D) |
107 # finish preparation |
115 sed -e "s#_SAMBA_BUILD_PROTO_#$(PROTO_DIR)#" \ |
108 COMPONENT_PRE_CONFIGURE_ACTION += \ |
116 $(COMPONENT_DIR)/Solaris/krb5-config > $@ |
109 ( cd $(@D) ; $(CONFIG_SHELL) autogen.sh ) |
117 $(CHMOD) 755 $@ |
110 |
118 |
111 COMPONENT_PRE_BUILD_ACTION = $(ENV) ; echo $(COMPONENT_BUILD_ENV) |
119 # Compiler settings |
112 |
|
113 # Depend on $(PROTO_DIR)/.mozldap because this target creates $(PROTO_DIR). |
|
114 $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: Solaris/libsam.c $(PROTO_DIR)/.mozldap |
|
115 $(MKDIR) $(PROTO_DIR)/opt/SUNWsamfs/lib |
|
116 $(CC.studio.32) -G $(studio_PIC) -hlibsam.so Solaris/libsam.c \ |
|
117 -I$(COMPONENT_DIR)/Solaris/include \ |
|
118 -o $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
|
119 |
|
120 CFLAGS.studio += $(studio_C99_ENABLE) |
120 CFLAGS.studio += $(studio_C99_ENABLE) |
121 CFLAGS.gcc += -std=c99 |
121 |
122 CFLAGS.gcc3 += -std=c99 |
122 LIBS += -lrt -lsec -lcrypt -lmd5 -lsocket -lnsl |
|
123 # libavahi and libgamin libraries are not available for 64bits |
|
124 LIBS32 = -lsendfile -lavahi-common -lavahi-core |
123 |
125 |
124 #CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\" |
126 #CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\" |
125 CPPFLAGS += $(CPP_LARGEFILES) |
127 CPPFLAGS += $(CPP_LARGEFILES) |
126 CPPFLAGS += $(CPP_XPG6MODE) |
128 CPPFLAGS += $(CPP_XPG6MODE) |
127 CPPFLAGS += -I$(PROTOUSRINCDIR)/samba -I$(PROTOUSRINCDIR)/samba/ldap6 -I$(BUILD_DIR_$(BITS))/include |
129 CPPFLAGS += -I/usr/include/openldap |
128 |
130 |
129 LIBS += -lrt -lsocket -lnsl |
131 LDFLAGS.32 += -R/usr/lib/samba |
130 # libavahi is not for 64bits but we do not need it |
132 LDFLAGS.32 += -R/usr/lib/samba/private |
131 LIBS32 = -lsendfile -lavahi-common -lavahi-core |
|
132 |
|
133 LDFLAGS.32 += -L $(PROTOUSRLIBDIR) |
|
134 LDFLAGS.32 += -L $(PROTOUSRLIBDIR)/samba -R/usr/lib/samba |
|
135 LDFLAGS.32 += -L $(PROTO_DIR)/opt/SUNWsamfs/lib |
|
136 LDFLAGS.32 += $(LIBS) $(LIBS32) |
133 LDFLAGS.32 += $(LIBS) $(LIBS32) |
137 |
134 |
138 LDFLAGS.64 += -L $(PROTOUSRLIBDIR)/$(MACH64) |
135 LDFLAGS.64 += -m64 |
139 LDFLAGS.64 += -L $(PROTOUSRLIBDIR)/samba/$(MACH64) -R/usr/lib/samba/$(MACH64) |
136 LDFLAGS.64 += -R/usr/lib/samba/$(MACH64) |
|
137 LDFLAGS.64 += -R/usr/lib/samba/private/$(MACH64) |
140 LDFLAGS.64 += $(LIBS) |
138 LDFLAGS.64 += $(LIBS) |
141 |
139 |
142 ifeq ($(COMPILER), studio) |
140 ASLR_MODE = $(ASLR_ENABLE) |
143 LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS) |
141 LD_OPTIONS += -B direct |
144 else |
142 |
145 LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS:%=-Xlinker %) |
143 # --enable-fhs should not be on |
146 endif |
144 CONFIGURE_OPTIONS = --exec-prefix=/usr |
147 |
145 CONFIGURE_OPTIONS += --bindir=/usr/lib/samba/bin |
148 CONFIGURE_LIBDIR.32 = /usr/lib/samba |
146 CONFIGURE_OPTIONS += --sbindir=/usr/lib/samba/sbin |
149 CONFIGURE_LIBDIR.64 = /usr/lib/samba/$(MACH64) |
147 CONFIGURE_OPTIONS.32 += --libdir=/usr/lib/samba |
|
148 CONFIGURE_OPTIONS.64 += --libdir=/usr/lib/samba/$(MACH64) |
|
149 CONFIGURE_OPTIONS.32 += --with-privatelibdir=/usr/lib/samba/private |
|
150 CONFIGURE_OPTIONS.64 += --with-privatelibdir=/usr/lib/samba/private/$(MACH64) |
|
151 CONFIGURE_OPTIONS += --sysconfdir=/etc/samba |
|
152 CONFIGURE_OPTIONS.32 += --with-pammodulesdir=/usr/lib/samba/security |
|
153 CONFIGURE_OPTIONS.64 += --with-pammodulesdir=/usr/lib/samba/security/$(MACH64) |
|
154 CONFIGURE_OPTIONS += --datarootdir=/usr/lib/samba |
|
155 CONFIGURE_OPTIONS += --mandir=/usr/share/man |
|
156 CONFIGURE_OPTIONS += --htmldir=/usr/share/samba/swat/help |
150 CONFIGURE_OPTIONS += --includedir=/usr/include/samba |
157 CONFIGURE_OPTIONS += --includedir=/usr/include/samba |
151 CONFIGURE_OPTIONS += --sysconfdir=/etc/samba |
|
152 CONFIGURE_OPTIONS += --with-configdir=/etc/samba |
|
153 CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private |
158 CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private |
154 CONFIGURE_OPTIONS += --with-swatdir=/usr/share/samba/swat |
|
155 CONFIGURE_OPTIONS += --localstatedir=/var/samba |
159 CONFIGURE_OPTIONS += --localstatedir=/var/samba |
156 CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks |
|
157 CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks |
|
158 CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log |
160 CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log |
159 CONFIGURE_OPTIONS += --enable-shared=yes |
161 CONFIGURE_OPTIONS += --sharedstatedir=/var/samba/com |
160 CONFIGURE_OPTIONS += --enable-static=no |
162 CONFIGURE_OPTIONS += --libexecdir=/usr/lib/samba |
161 CONFIGURE_OPTIONS.32 += --with-static-modules=vfs_solarisacl |
163 |
162 CONFIGURE_OPTIONS.32 += --with-shared-modules=vfs_worm,vfs_zfsacl,vfs_aio_pthread,vfs_samfs,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex |
164 CONFIGURE_OPTIONS += --with-static-modules= |
163 CONFIGURE_OPTIONS.64 += --with-static-modules= |
165 CONFIGURE_OPTIONS.32 += --with-shared-modules=vfs_worm,vfs_zfsacl,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex,vfs_solarisacl |
164 CONFIGURE_OPTIONS.64 += --with-shared-modules= |
166 CONFIGURE_OPTIONS.64 += --with-shared-modules=idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex |
165 CONFIGURE_OPTIONS += --with-readline |
|
166 CONFIGURE_OPTIONS += --enable-cups |
|
167 CONFIGURE_OPTIONS += --with-aio-support |
|
168 CONFIGURE_OPTIONS += --with-acl-support |
|
169 CONFIGURE_OPTIONS += --with-ads |
167 CONFIGURE_OPTIONS += --with-ads |
|
168 CONFIGURE_OPTIONS += --with-winbind |
|
169 CONFIGURE_OPTIONS += --enable-nss-wrapper |
170 CONFIGURE_OPTIONS += --with-ldap |
170 CONFIGURE_OPTIONS += --with-ldap |
171 CONFIGURE_OPTIONS += --with-automount |
171 CONFIGURE_OPTIONS += --with-libldap=ldap_r |
172 CONFIGURE_OPTIONS += --with-dnsupdate=no |
172 CONFIGURE_OPTIONS += --with-system-mitkrb5 |
173 CONFIGURE_OPTIONS += --with-pam |
173 CONFIGURE_OPTIONS += --without-ad-dc |
174 CONFIGURE_OPTIONS += --with-winbind |
174 |
175 |
175 CONFIGURE_OPTIONS += --nocache |
176 CONFIGURE_OPTIONS += LD="$(LD)" |
176 CONFIGURE_OPTIONS += --nopyo |
177 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
177 CONFIGURE_OPTIONS += --disable-rpath |
178 CONFIGURE_OPTIONS.32 += CPPFLAGS="$(CPPFLAGS) -I$(COMPONENT_DIR)/Solaris/include" |
178 CONFIGURE_OPTIONS += --disable-gnutls |
179 CONFIGURE_OPTIONS.64 += CPPFLAGS="$(CPPFLAGS)" |
179 CONFIGURE_OPTIONS += --bundled-libraries=ALL |
180 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
180 |
181 CONFIGURE_OPTIONS.32 += LIBS="$(LIBS) $(LIBS32)" |
181 #CONFIGURE_OPTIONS.32 += --with-samfs=$(PROTO_DIR)/opt/SUNWsamfs/lib |
182 CONFIGURE_OPTIONS.64 += LIBS="$(LIBS)" |
182 |
183 CONFIGURE_OPTIONS += LDAP_LIBS="-lldap60 -lssldap60" |
183 CONFIGURE_ENV += CC="$(CC)" |
184 CONFIGURE_OPTIONS += CUPS_CONFIG=$(USRBINDIR)/cups-config |
184 CONFIGURE_ENV += CPP="$(CC) -E" |
185 CONFIGURE_OPTIONS.32 += SAMFS_LIBS="-R/opt/SUNWsamfs/lib -lsam" |
185 CONFIGURE_ENV += AWK=gawk |
186 |
186 CONFIGURE_ENV += PERL=/usr/perl5/5.16/bin/perl |
187 # download recent docbook-xsl and unpack it |
187 CONFIGURE_ENV += PYTHONDIR="$(PYTHON_VENDOR_PACKAGES)" |
188 $(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep: $(COMPONENT_ARCHIVE_1) \ |
188 CONFIGURE_ENV += PYTHONARCHDIR="$(PYTHON_VENDOR_PACKAGES)/samba" |
189 $(SOURCE_DIR)/.prep $(PROTO_DIR)/.mozldap |
189 CONFIGURE_ENV += LD="$(LD)" |
190 cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) |
190 CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
191 cd $(DOCS-XML_DIR) ; $(GMAKE) clobber |
191 CONFIGURE_ENV.32 += CPPFLAGS="$(CPPFLAGS) -I$(PROTO_DIR)/usr/include -I$(COMPONENT_DIR)/Solaris/include" |
192 $(TOUCH) $@ |
192 CONFIGURE_ENV.64 += CPPFLAGS="$(CPPFLAGS) -I$(PROTO_DIR)/usr/include" |
193 |
193 CONFIGURE_ENV.32 += LINKFLAGS="$(LDFLAGS.32)" |
194 prep:: |
194 CONFIGURE_ENV.64 += LINKFLAGS="$(LDFLAGS.64)" |
195 $(MAKE) -C $(COMPONENT_DIR)/../mozldap prep |
195 CONFIGURE_ENV.64 += MACH64="$(MACH64)" |
196 |
196 CONFIGURE_ENV += LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" |
197 # create also the: $(DOCS-XML_DIR)/configure and $(DOCS-XML_DIR)/build/catalog.xml |
197 CONFIGURE_ENV += CUPS_CONFIG=$(USRBINDIR)/cups-config |
198 # needed to buils docs from XML sources |
198 |
199 $(DOCS-XML_DIR)/Makefile.settings: $(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep |
199 # Build of Samba 3.6 |
200 cd $(@D) ; $(GMAKE) configure \ |
200 # Samba 3.6 is being built in separate directory (./samba36/) to make use of |
201 BUILDDIR=$(@D) \ |
201 # the Userland infrastructure. It uses standard recursive make where SAMBA36VER |
202 DOCBOOKXSLVER=$(COMPONENT_VERSION_1) \ |
202 # must be set to gmake. Standard (Userland) Makefile is also in ./samba36/ dir. |
203 DOCBOOKXSLDIR=$(BUILD_DIR)/$(COMPONENT_SRC_1) |
203 $(COMPONENT_DIR)/samba36/build/$(MACH32)/source3/.installed \ |
204 |
204 $(COMPONENT_DIR)/samba36/build/$(MACH64)/source3/.installed: |
205 # Build docs from DocBook XML sources. |
205 $(GMAKE) -C $(COMPONENT_DIR)/samba36 install SAMBA36VER=$(SAMBA36VERSION) |
206 $(DOCS-XML_DIR)/.built: $(DOCS-XML_DIR)/Makefile.settings |
206 |
207 cd $(@D) ; \ |
207 # Propagation of smb.conf with default settings. |
208 env - XML_CATALOG_FILES="catalog.xml file:///$(@D)/build/catalog.xml" \ |
208 $(PROTO_DIR)/etc/samba/smb.conf-example: $(BUILD_DIR_SMB)/.built |
209 $(GMAKE) smbdotconf/parameters.all.xml manpages3 htmlman3 |
|
210 $(TOUCH) $@ |
|
211 |
|
212 $(PROTO_DIR)/etc/samba/smb.conf-example: $(BUILD_32) |
|
213 $(MKDIR) $(@D) |
209 $(MKDIR) $(@D) |
214 sed -f $(COMPONENT_DIR)/Solaris/smbconf.sed > $@ \ |
210 sed -f $(COMPONENT_DIR)/Solaris/smbconf.sed > $@ \ |
215 $(BUILD_DIR)/$(MACH32)/examples/smb.conf.default |
211 $(BUILD_DIR_SMB)/examples/smb.conf.default |
216 |
212 |
217 # Samba targets |
213 # Build targets for WAF: |
218 $(BUILD_32): COMPONENT_BUILD_TARGETS = showlayout all libsmbclient modules smbtorture |
214 # (motivation) Samba started to use WAF (build system from Google) from the 3.x |
219 $(BUILD_64): COMPONENT_BUILD_TARGETS = showlayout nss_modules pam_modules pam_smbpass wins pam_winbind |
215 # (as a parallel build system) but Samba4 discontinued the use of auto tools |
220 $(INSTALL_32): COMPONENT_INSTALL_TARGETS = showlayout install-everything |
216 # definitively. |
221 $(INSTALL_64): COMPONENT_INSTALL_TARGETS = showlayout installpammodules |
217 # (note) .BDprep target is an additional step between .prep and .configure |
|
218 # targets. It was added because there were problems with libtool-like phase of |
|
219 # WAF when the not "prepared well". "waf distclean" on CLONEY'ed BUILD_DIR is |
|
220 # enough. |
|
221 |
|
222 # Prepare build dir for Samba + Winbind. |
|
223 $(BUILD_DIR_SMB)/.BDprep: $(SOURCE_DIR)/.prep $(PROTO_DIR)/usr/include/gssapi/gssapi_krb5.h \ |
|
224 $(PROTO_DIR)/usr/bin/krb5-config |
|
225 # re-create configure dir |
|
226 $(MKDIR) $(@D) |
|
227 # Clone SOURCE_DIR |
|
228 $(CLONEY) $(SOURCE_DIR) $(@D) |
|
229 # clenup of clone |
|
230 (cd $(@D) ; $(ENV) $(WAF_PATH) waf distclean $(WAFOPT1) ) |
|
231 $(TOUCH) $@ |
|
232 |
|
233 # Configure of Samba + Winbind. |
|
234 $(BUILD_DIR_SMB)/.configured: $(BUILD_DIR_SMB)/.BDprep $(PROTO_DIR)/usr/lib/samba/libgssapi_krb5.so |
|
235 (cd $(@D) ; $(ENV) $(WAF_PATH) $(CONFIGURE_ENV) \ |
|
236 $(CONFIGURE_ENV.32) waf configure $(WAFOPT1) $(CONFIGURE_OPTIONS) $(CONFIGURE_OPTIONS.32) ) |
|
237 $(TOUCH) $@ |
|
238 |
|
239 # Build of Samba + Winbind. |
|
240 $(BUILD_DIR_SMB)/.built: $(BUILD_DIR_SMB)/.configured |
|
241 (cd $(@D) ; $(ENV) $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf build $(WAFOPT1) ) |
|
242 $(TOUCH) $@ |
|
243 |
|
244 # Install of Samba + Winbind. |
|
245 $(BUILD_DIR_SMB)/.installed: $(BUILD_DIR_SMB)/.built |
|
246 (cd $(@D) ; $(ENV) $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf install $(WAFOPT1) --destdir=$(PROTO_DIR) ) |
|
247 $(PYTHON) -m compileall $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)/ |
|
248 $(TOUCH) $@ |
|
249 |
|
250 # Prepare build dir for Winbind (without Samba) for different bitness. |
|
251 $(BUILD_DIR_WINB)/.BDprep: $(SOURCE_DIR)/.prep $(PROTO_DIR)/usr/include/gssapi/gssapi_krb5.h \ |
|
252 $(PROTO_DIR)/usr/bin/krb5-config |
|
253 # re-create configure dir |
|
254 $(MKDIR) $(@D) |
|
255 # Clone SOURCE_DIR |
|
256 $(CLONEY) $(SOURCE_DIR) $(@D) |
|
257 # clenup of clone |
|
258 (cd $(@D) ; $(ENV) $(WAF_PATH) waf distclean $(WAFOPT1) ) |
|
259 $(TOUCH) $@ |
|
260 |
|
261 # Configure of Winbind (without Samba) for different bitness. |
|
262 $(BUILD_DIR_WINB)/.configured: $(BUILD_DIR_WINB)/.BDprep $(PROTO_DIR)/usr/lib/samba/$(MACH64)/libgssapi_krb5.so |
|
263 (cd $(@D) ; $(ENV) $(WAF_PATH) $(CONFIGURE_ENV) \ |
|
264 $(CONFIGURE_ENV.64) waf configure $(WAFOPT1) $(CONFIGURE_OPTIONS) $(CONFIGURE_OPTIONS.64) ) |
|
265 $(TOUCH) $@ |
|
266 |
|
267 # Build of Winbind (without Samba) for different bitness. |
|
268 WB_TARGETS = --targets=nss_winbind,pamsmbpass,pamwinbind |
|
269 $(BUILD_DIR_WINB)/.built: $(BUILD_DIR_WINB)/.configured |
|
270 (cd $(@D) ; $(ENV) $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf build $(WAFOPT1) \ |
|
271 $(WB_TARGETS) ) |
|
272 $(TOUCH) $@ |
|
273 |
|
274 # Installf Winbind (without Samba) for different bitness. |
|
275 $(BUILD_DIR_WINB)/.installed: $(BUILD_DIR_WINB)/.built |
|
276 (cd $(@D) ; \ |
|
277 $(INSTALL) -d $(PROTO_DIR)/usr/lib/samba/$(MACH64) ; \ |
|
278 $(INSTALL) -m 0555 -t $(PROTO_DIR)/usr/lib/samba/$(MACH64) bin/shared/*.so* ; \ |
|
279 $(INSTALL) -d $(PROTO_DIR)/usr/lib/samba/private/$(MACH64) ; \ |
|
280 $(INSTALL) -m 0555 -t $(PROTO_DIR)/usr/lib/samba/private/$(MACH64) bin/shared/private/*.so* \ |
|
281 ) |
|
282 $(TOUCH) $@ |
|
283 |
|
284 # Set appropriate bitnesses for Samba + Winbind / Winbind (without Samba). |
|
285 $(BUILD_DIR_SMB)/.configured: BITS=32 |
|
286 $(BUILD_DIR_WINB)/.configured: BITS=64 |
222 |
287 |
223 # common targets |
288 # common targets |
224 configure: $(CONFIGURE_32_and_64) |
289 build: $(BUILD_DIR_SMB)/.built $(BUILD_DIR_WINB)/.built |
225 |
290 |
226 build: $(BUILD_32_and_64) |
291 include $(WS_MAKE_RULES)/shared-targets.mk |
227 |
292 |
228 install: $(PROTO_DIR)/etc/samba/smb.conf-example $(INSTALL_32_and_64) |
293 install: $(BUILD_DIR_SMB)/.installed $(BUILD_DIR_WINB)/.installed \ |
|
294 $(COMPONENT_DIR)/samba36/build/$(MACH32)/source3/.installed \ |
|
295 $(COMPONENT_DIR)/samba36/build/$(MACH64)/source3/.installed |
229 |
296 |
230 test: $(NO_TESTS) |
297 test: $(NO_TESTS) |
231 |
298 |
232 system-test: $(NO_TESTS) |
299 system-test: $(NO_TESTS) |
233 |
300 |
234 clean:: |
301 clean:: |
235 $(GMAKE) -C $(COMPONENT_DIR)/../mozldap clean |
302 $(RM) -r $(BUILD_DIR) |
236 |
303 # recursive make to clean Samba 3.6 |
|
304 $(GMAKE) -C $(COMPONENT_DIR)/samba36 clean SAMBA36VER=$(SAMBA36VERSION) |
|
305 |
|
306 |
|
307 REQUIRED_PACKAGES += archiver/gnu-tar |
|
308 REQUIRED_PACKAGES += compress/bzip2 |
|
309 REQUIRED_PACKAGES += compress/gzip |
|
310 REQUIRED_PACKAGES += compress/p7zip |
|
311 REQUIRED_PACKAGES += compress/unzip |
|
312 REQUIRED_PACKAGES += compress/xz |
|
313 REQUIRED_PACKAGES += developer/build/gnu-make |
|
314 REQUIRED_PACKAGES += developer/build/make |
|
315 REQUIRED_PACKAGES += developer/java/jdk |
|
316 REQUIRED_PACKAGES += developer/java/jdk-7 |
|
317 REQUIRED_PACKAGES += developer/versioning/mercurial |
|
318 REQUIRED_PACKAGES += file/gnu-findutils |
237 REQUIRED_PACKAGES += library/file-monitor/gamin |
319 REQUIRED_PACKAGES += library/file-monitor/gamin |
238 REQUIRED_PACKAGES += library/ncurses |
320 REQUIRED_PACKAGES += library/ncurses |
|
321 REQUIRED_PACKAGES += library/openldap |
239 REQUIRED_PACKAGES += library/popt |
322 REQUIRED_PACKAGES += library/popt |
240 REQUIRED_PACKAGES += library/print/cups-libs |
323 REQUIRED_PACKAGES += library/print/cups-libs |
241 REQUIRED_PACKAGES += library/readline |
324 REQUIRED_PACKAGES += library/readline |
242 REQUIRED_PACKAGES += library/samba/libsmbclient |
325 REQUIRED_PACKAGES += library/samba/libsmbclient |
243 REQUIRED_PACKAGES += library/zlib |
326 REQUIRED_PACKAGES += library/zlib |
|
327 REQUIRED_PACKAGES += package/pkg |
244 REQUIRED_PACKAGES += runtime/perl-512 |
328 REQUIRED_PACKAGES += runtime/perl-512 |
245 REQUIRED_PACKAGES += runtime/perl-516 |
329 REQUIRED_PACKAGES += runtime/perl-516 |
|
330 REQUIRED_PACKAGES += runtime/python-27 |
|
331 REQUIRED_PACKAGES += runtime/ruby |
|
332 REQUIRED_PACKAGES += security/sudo |
246 REQUIRED_PACKAGES += service/security/kerberos-5 |
333 REQUIRED_PACKAGES += service/security/kerberos-5 |
|
334 REQUIRED_PACKAGES += shell/bash |
247 REQUIRED_PACKAGES += shell/ksh93 |
335 REQUIRED_PACKAGES += shell/ksh93 |
248 REQUIRED_PACKAGES += system/core-os |
336 REQUIRED_PACKAGES += system/core-os |
249 REQUIRED_PACKAGES += system/library |
337 REQUIRED_PACKAGES += system/library |
250 REQUIRED_PACKAGES += system/library/gcc-3-runtime |
338 REQUIRED_PACKAGES += system/library/gcc-3-runtime |
251 REQUIRED_PACKAGES += system/library/gcc-45-runtime |
339 REQUIRED_PACKAGES += system/library/gcc-45-runtime |
252 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
340 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
253 REQUIRED_PACKAGES += system/library/security/crypto |
341 REQUIRED_PACKAGES += system/library/security/crypto |
254 REQUIRED_PACKAGES += system/library/security/gss |
342 REQUIRED_PACKAGES += system/library/security/gss |
|
343 REQUIRED_PACKAGES += system/linker |
255 REQUIRED_PACKAGES += system/network |
344 REQUIRED_PACKAGES += system/network |
256 REQUIRED_PACKAGES += system/network/avahi |
345 REQUIRED_PACKAGES += system/network/avahi |
|
346 REQUIRED_PACKAGES += text/gawk |
|
347 REQUIRED_PACKAGES += text/gnu-grep |
|
348 REQUIRED_PACKAGES += text/gnu-patch |
|
349 REQUIRED_PACKAGES += text/gnu-sed |
|
350 |