1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 |
|
22 # |
|
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 # Samba does not work properly on i86 when built by studio. |
|
27 # Samba on SPARC has serious performance drop when built by gcc. |
|
28 ifeq ($(uname -p),sparc) |
|
29 COMPILER = studio |
|
30 else |
|
31 COMPILER = gcc |
|
32 endif |
|
33 |
|
34 # parfait seems to spin on us |
|
35 export PARFAIT_BUILD=no |
|
36 |
|
37 include ../../../make-rules/shared-macros.mk |
|
38 |
|
39 COMPONENT_NAME= samba |
|
40 COMPONENT_VERSION= 3.6.25 |
|
41 TPNO= 21657 |
|
42 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
43 COMPONENT_PROJECT_URL= http://www.samba.org/ |
|
44 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
45 COMPONENT_ARCHIVE_HASH= sha256:8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 |
|
46 COMPONENT_ARCHIVE_URL= http://ftp.samba.org/pub/samba/stable/$(COMPONENT_ARCHIVE) |
|
47 COMPONENT_BUGDB= utility/samba |
|
48 |
|
49 include $(WS_MAKE_RULES)/prep.mk |
|
50 |
|
51 SRC_OFFSET = source3 |
|
52 # Now we override paths to .built |
|
53 BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/$(SRC_OFFSET) |
|
54 BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)/$(SRC_OFFSET) |
|
55 |
|
56 include $(WS_MAKE_RULES)/configure.mk |
|
57 |
|
58 # Depends on Samba 4 which has S12-only dependencies. |
|
59 ifeq ($(BUILD_TYPE), evaluation) |
|
60 BUILD_32_and_64= |
|
61 INSTALL_32_and_64= |
|
62 PUBLISH_STAMP= |
|
63 endif |
|
64 |
|
65 include $(WS_MAKE_RULES)/ips.mk |
|
66 |
|
67 # dirs to search for "include" in samba.p5m |
|
68 PKG_OPTIONS += -I $(COMPONENT_DIR) |
|
69 PKG_OPTIONS += -I $(COMPONENT_DIR)/../samba |
|
70 # Set search path for pkg files |
|
71 PKG_PROTO_DIRS += $(COMPONENT_DIR) |
|
72 |
|
73 CONFIGURE_SCRIPT = $(BUILD_DIR_$(BITS))/configure |
|
74 |
|
75 # Solve dependencies before the 32bits configure. |
|
76 $(BUILD_DIR_32)/.configured: $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
|
77 |
|
78 # Start 64bits configure after the 32bits one is finished |
|
79 # to have all dependecies solved. |
|
80 $(BUILD_DIR_64)/.configured: $(BUILD_DIR_32)/.configured |
|
81 |
|
82 # re-create configure dir with respect of SRC_OFFSET |
|
83 # (target $(BUILD_DIR_64)/.configured does not know about |
|
84 # the lower level of directories) |
|
85 COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
86 $(RM) -r $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
87 $(MKDIR) $(BUILD_DIR)/$(MACH$(BITS)) ; |
|
88 |
|
89 # Clone SOURCE_DIR and remove links to all of the files generated |
|
90 # from *.in to distinguish then between the 32/64bits builds. |
|
91 COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
92 ( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
93 find $(@D)/.. -name '*.in' | sed -e 's/.in$$//' | xargs $(RM) ) ; |
|
94 |
|
95 # finish preparation |
|
96 COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
97 ( cd $(@D) ; $(CONFIG_SHELL) autogen.sh ) |
|
98 |
|
99 COMPONENT_PRE_BUILD_ACTION = $(ENV) ; echo $(COMPONENT_BUILD_ENV) |
|
100 |
|
101 # It should create $(PROTO_DIR). |
|
102 $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: ../samba/Solaris/libsam.c |
|
103 $(MKDIR) $(PROTO_DIR)/opt/SUNWsamfs/lib |
|
104 $(CC.studio.32) -G $(studio_PIC) -hlibsam.so ../samba/Solaris/libsam.c \ |
|
105 -I$(COMPONENT_DIR)/../samba/Solaris/include \ |
|
106 -o $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
|
107 |
|
108 CFLAGS.studio += $(studio_C99_ENABLE) |
|
109 CFLAGS.gcc += -std=c99 |
|
110 CFLAGS.gcc3 += -std=c99 |
|
111 |
|
112 SAMBA36DIR = /usr/lib/samba/samba36 |
|
113 CONFIGURE_PREFIX = $(SAMBA36DIR) |
|
114 SAMBA36INCDIR = $(SAMBA36DIR)/include |
|
115 |
|
116 #CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\" |
|
117 CPPFLAGS += $(CPP_LARGEFILES) |
|
118 CPPFLAGS += $(CPP_XPG6MODE) |
|
119 CPPFLAGS += -I$(PROTO_DIR)$(SAMBA36INCDIR) -I$(USRINCDIR)/samba/ldap6 -I$(BUILD_DIR_$(BITS))/include |
|
120 |
|
121 LIBS += -lrt -lsocket -lnsl |
|
122 # libavahi is not for 64bits but we do not need it |
|
123 LIBS32 = -lsendfile -lavahi-common -lavahi-core |
|
124 |
|
125 LDFLAGS += -L $(PROTO_DIR)$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS)) |
|
126 |
|
127 LDFLAGS.32 += -L $(PROTO_DIR)/opt/SUNWsamfs/lib |
|
128 LDFLAGS.32 += $(LIBS) $(LIBS32) |
|
129 |
|
130 LDFLAGS.64 += $(LIBS) |
|
131 |
|
132 ifeq ($(COMPILER), studio) |
|
133 LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS) |
|
134 else |
|
135 LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS:%=-Xlinker %) |
|
136 endif |
|
137 |
|
138 ASLR_MODE = $(ASLR_ENABLE) |
|
139 |
|
140 CONFIGURE_OPTIONS += --includedir=$(SAMBA36INCDIR) |
|
141 CONFIGURE_OPTIONS += --sysconfdir=/etc/samba |
|
142 CONFIGURE_OPTIONS += --with-configdir=/etc/samba |
|
143 CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private |
|
144 CONFIGURE_OPTIONS += --with-swatdir=$(SAMBA36DIR)/swat |
|
145 CONFIGURE_OPTIONS += --localstatedir=/var/samba |
|
146 CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks |
|
147 CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks |
|
148 CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log |
|
149 CONFIGURE_OPTIONS += --enable-shared=yes |
|
150 CONFIGURE_OPTIONS += --enable-static=no |
|
151 CONFIGURE_OPTIONS.32 += --with-static-modules=vfs_solarisacl |
|
152 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 |
|
153 CONFIGURE_OPTIONS.64 += --with-static-modules= |
|
154 CONFIGURE_OPTIONS.64 += --with-shared-modules= |
|
155 CONFIGURE_OPTIONS += --with-readline |
|
156 CONFIGURE_OPTIONS += --enable-cups |
|
157 CONFIGURE_OPTIONS += --with-aio-support |
|
158 CONFIGURE_OPTIONS += --with-acl-support |
|
159 CONFIGURE_OPTIONS += --with-ads |
|
160 CONFIGURE_OPTIONS += --with-ldap |
|
161 CONFIGURE_OPTIONS += --with-automount |
|
162 CONFIGURE_OPTIONS += --with-dnsupdate=no |
|
163 CONFIGURE_OPTIONS += --with-pam |
|
164 CONFIGURE_OPTIONS += --with-winbind |
|
165 |
|
166 CONFIGURE_OPTIONS += LD="$(LD)" |
|
167 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
168 CONFIGURE_OPTIONS.32 += CPPFLAGS="$(CPPFLAGS) -I$(COMPONENT_DIR)/../samba/Solaris/include" |
|
169 CONFIGURE_OPTIONS.64 += CPPFLAGS="$(CPPFLAGS)" |
|
170 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
171 CONFIGURE_OPTIONS.32 += LIBS="$(LIBS) $(LIBS32)" |
|
172 CONFIGURE_OPTIONS.64 += LIBS="$(LIBS)" |
|
173 CONFIGURE_OPTIONS += LDAP_LIBS="-lldap60 -lssldap60" |
|
174 CONFIGURE_OPTIONS += CUPS_CONFIG=$(USRBINDIR)/cups-config |
|
175 CONFIGURE_OPTIONS.32 += SAMFS_LIBS="-R/opt/SUNWsamfs/lib -lsam" |
|
176 |
|
177 # Samba targets |
|
178 $(BUILD_32): COMPONENT_BUILD_TARGETS = showlayout all libsmbclient modules smbtorture |
|
179 $(BUILD_64): COMPONENT_BUILD_TARGETS = showlayout nss_modules pam_modules pam_smbpass wins pam_winbind |
|
180 $(INSTALL_32): COMPONENT_INSTALL_TARGETS = showlayout install-everything |
|
181 $(INSTALL_64): COMPONENT_INSTALL_TARGETS = showlayout installpammodules |
|
182 |
|
183 # common targets |
|
184 configure: $(CONFIGURE_32_and_64) |
|
185 |
|
186 build: $(BUILD_32_and_64) |
|
187 |
|
188 install: $(INSTALL_32_and_64) |
|
189 |
|
190 test: $(NO_TESTS) |
|
191 |
|
192 system-test: $(NO_TESTS) |
|
193 |
|
194 REQUIRED_PACKAGES += library/file-monitor/gamin |
|
195 REQUIRED_PACKAGES += library/ncurses |
|
196 REQUIRED_PACKAGES += library/popt |
|
197 REQUIRED_PACKAGES += library/print/cups-libs |
|
198 REQUIRED_PACKAGES += library/readline |
|
199 REQUIRED_PACKAGES += library/samba/libsmbclient |
|
200 REQUIRED_PACKAGES += library/zlib |
|
201 REQUIRED_PACKAGES += runtime/perl-512 |
|
202 REQUIRED_PACKAGES += runtime/perl-520 |
|
203 REQUIRED_PACKAGES += service/security/kerberos-5 |
|
204 REQUIRED_PACKAGES += shell/ksh93 |
|
205 REQUIRED_PACKAGES += system/core-os |
|
206 REQUIRED_PACKAGES += system/library |
|
207 REQUIRED_PACKAGES += system/library/gcc-3-runtime |
|
208 REQUIRED_PACKAGES += system/library/gcc-45-runtime |
|
209 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
|
210 REQUIRED_PACKAGES += system/library/security/crypto |
|
211 REQUIRED_PACKAGES += system/library/security/gss |
|
212 REQUIRED_PACKAGES += system/network |
|
213 REQUIRED_PACKAGES += system/network/avahi |
|