commit | author | age
|
4b7e1c
|
1 |
# |
JS |
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 |
# |
0566f2
|
23 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
4b7e1c
|
24 |
# |
7999b2
|
25 |
|
4b7e1c
|
26 |
include ../../../make-rules/shared-macros.mk |
JS |
27 |
|
|
28 |
COMPONENT_NAME= samba |
15a25b
|
29 |
COMPONENT_VERSION= 3.6.15 |
4b7e1c
|
30 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
JS |
31 |
COMPONENT_PROJECT_URL= http://www.samba.org/ |
|
32 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
15a25b
|
33 |
COMPONENT_ARCHIVE_HASH= sha256:42b9acb13f8760a1767829ebaa4c371e462aad5287caf92887e64930cf27da60 |
063f14
|
34 |
COMPONENT_ARCHIVE_URL= http://us1.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE) |
3b89c9
|
35 |
COMPONENT_BUGDB= utility/samba |
4b7e1c
|
36 |
|
JS |
37 |
COMPONENT_NAME_1= docbook-xsl |
|
38 |
COMPONENT_VERSION_1= 1.76.1 |
|
39 |
COMPONENT_SRC_1= $(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1) |
|
40 |
COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.bz2 |
35e110
|
41 |
COMPONENT_ARCHIVE_HASH_1= \ |
MS |
42 |
sha256:d6bdfd76f672c810299c71443e5127431ffb87d2c79d818aee72c86eaccd312c |
4b7e1c
|
43 |
COMPONENT_ARCHIVE_URL_1= http://sourceforge.net/projects/docbook/files/$(COMPONENT_NAME_1)/$(COMPONENT_VERSION_1)/$(COMPONENT_ARCHIVE_1) |
JS |
44 |
|
|
45 |
COMPONENT_ARCHIVE_2= libsam-LGPL.tar |
35e110
|
46 |
COMPONENT_ARCHIVE_HASH_2= \ |
MS |
47 |
sha256:4324f2c4a9ba94f1165c5922f166636621681b09d635257d921f6df654e7191e |
4b7e1c
|
48 |
COMPONENT_ARCHIVE_URL_2= http://hub.opensolaris.org/bin/download/Project+samqfs/files/libsam%2DLGPL.tar |
063f14
|
49 |
|
JS |
50 |
# Samba does not work properly on i86 when built by studio. |
|
51 |
# Samba on SPARC has serious performance drop when built by gcc. |
|
52 |
ifeq ($(MACH), sparc) |
|
53 |
COMPILER = studio |
|
54 |
else |
|
55 |
COMPILER = gcc |
|
56 |
endif |
4b7e1c
|
57 |
|
JS |
58 |
include ../../../make-rules/prep.mk |
|
59 |
|
|
60 |
SRC_OFFSET = source3 |
|
61 |
# Now we override paths to .built |
|
62 |
BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/$(SRC_OFFSET) |
|
63 |
BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)/$(SRC_OFFSET) |
|
64 |
|
|
65 |
include ../../../make-rules/configure.mk |
|
66 |
include ../../../make-rules/ips.mk |
|
67 |
|
|
68 |
CONFIGURE_SCRIPT = $(BUILD_DIR_$(BITS))/configure |
|
69 |
|
|
70 |
PKG_OPTIONS += -I $(COMPONENT_DIR) |
|
71 |
|
|
72 |
DOCS-XML_DIR = $(SOURCE_DIR)/docs-xml |
|
73 |
|
|
74 |
# Build mozldap if not yet built. |
|
75 |
$(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
|
76 |
$(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed: |
|
77 |
$(GMAKE) -C $(COMPONENT_DIR)/../mozldap install |
|
78 |
|
|
79 |
# Clone mozldap libs and headers to $(PROTO_DIR). |
|
80 |
# Create also $(PROTO_DIR). |
|
81 |
$(PROTO_DIR)/.mozldap: $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
|
82 |
$(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed |
|
83 |
$(MKDIR) $(PROTO_DIR) |
|
84 |
$(CLONEY) $(COMPONENT_DIR)/../mozldap/build/prototype/$(MACH) $(PROTO_DIR) |
|
85 |
$(TOUCH) $@ |
|
86 |
|
|
87 |
# Solve dependencies before the 32bits configure. |
|
88 |
$(BUILD_DIR_32)/.configured: $(DOCS-XML_DIR)/.built $(PROTO_DIR)/.mozldap \ |
|
89 |
$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
|
90 |
|
|
91 |
# Start 64bits configure after the 32bits one is finished |
|
92 |
# to have all dependecies solved. |
|
93 |
$(BUILD_DIR_64)/.configured: $(BUILD_DIR_32)/.configured |
|
94 |
|
|
95 |
# re-create configure dir with respect of SRC_OFFSET |
|
96 |
# (target $(BUILD_DIR_64)/.configured does not know about |
|
97 |
# the lower level of directories) |
|
98 |
COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
99 |
$(RM) -r $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
100 |
$(MKDIR) $(BUILD_DIR)/$(MACH$(BITS)) ; |
|
101 |
|
|
102 |
# Clone SOURCE_DIR and remove links to all of the files generated |
|
103 |
# from *.in to distinguish then between the 32/64bits builds. |
|
104 |
COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
105 |
( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
106 |
find $(@D)/.. -name '*.in' | sed -e 's/.in$$//' | xargs $(RM) ) ; |
|
107 |
|
|
108 |
# finish preparation |
|
109 |
COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
110 |
( cd $(@D) ; $(CONFIG_SHELL) autogen.sh ) |
|
111 |
|
|
112 |
# Depend on $(PROTO_DIR)/.mozldap because this target creates $(PROTO_DIR). |
|
113 |
$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: Solaris/libsam.c \ |
|
114 |
$(COMPONENT_ARCHIVE_2) $(PROTO_DIR)/.mozldap |
|
115 |
$(MKDIR) $(PROTO_DIR)/opt/SUNWsamfs/lib |
b3acbd
|
116 |
$(CC.studio.32) -G $(studio_PIC) -hlibsam.so Solaris/libsam.c \ |
4b7e1c
|
117 |
-o $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so |
JS |
118 |
cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2) |
|
119 |
|
063f14
|
120 |
CFLAGS.studio += $(studio_C99_ENABLE) |
JS |
121 |
CFLAGS.gcc += -std=c99 |
4b7e1c
|
122 |
|
4655ae
|
123 |
#CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\" |
063f14
|
124 |
CPPFLAGS += $(CPP_LARGEFILES) |
JS |
125 |
CPPFLAGS += $(CPP_XPG6MODE) |
|
126 |
CPPFLAGS += -I$(PROTOUSRINCDIR)/samba -I$(PROTOUSRINCDIR)/samba/ldap6 -I$(BUILD_DIR_$(BITS))/include |
4b7e1c
|
127 |
|
JS |
128 |
LIBS += -lrt -lsocket -lnsl |
|
129 |
# libavahi is not for 64bits but we do not need it |
|
130 |
LIBS32 = -lsendfile -lavahi-common -lavahi-core |
|
131 |
|
|
132 |
LDFLAGS.32 += -L $(PROTOUSRLIBDIR) |
|
133 |
LDFLAGS.32 += -L $(PROTOUSRLIBDIR)/samba -R/usr/lib/samba |
|
134 |
LDFLAGS.32 += -L $(PROTO_DIR)/opt/SUNWsamfs/lib |
|
135 |
LDFLAGS.32 += $(LIBS) $(LIBS32) |
|
136 |
|
|
137 |
LDFLAGS.64 += -L $(PROTOUSRLIBDIR)/$(MACH64) |
|
138 |
LDFLAGS.64 += -L $(PROTOUSRLIBDIR)/samba/$(MACH64) -R/usr/lib/samba/$(MACH64) |
|
139 |
LDFLAGS.64 += $(LIBS) |
|
140 |
|
063f14
|
141 |
ifeq ($(COMPILER), studio) |
4b7e1c
|
142 |
LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS) |
063f14
|
143 |
else |
JS |
144 |
LDFLAGS += $(LDFLAGS.$(BITS)) $(LD_OPTIONS:%=-Xlinker %) |
|
145 |
endif |
4b7e1c
|
146 |
|
JS |
147 |
CONFIGURE_LIBDIR.32 = /usr/lib/samba |
|
148 |
CONFIGURE_LIBDIR.64 = /usr/lib/samba/$(MACH64) |
b20825
|
149 |
CONFIGURE_OPTIONS += --includedir=/usr/include/samba |
JS |
150 |
CONFIGURE_OPTIONS += --sysconfdir=/etc/samba |
|
151 |
CONFIGURE_OPTIONS += --with-configdir=/etc/samba |
|
152 |
CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private |
|
153 |
CONFIGURE_OPTIONS += --with-swatdir=/usr/share/samba/swat |
|
154 |
CONFIGURE_OPTIONS += --localstatedir=/var/samba |
|
155 |
CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks |
|
156 |
CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks |
|
157 |
CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log |
|
158 |
CONFIGURE_OPTIONS += --enable-shared=yes |
|
159 |
CONFIGURE_OPTIONS += --enable-static=no |
0566f2
|
160 |
CONFIGURE_OPTIONS.32 += --with-static-modules=vfs_solarisacl |
4b7e1c
|
161 |
CONFIGURE_OPTIONS.32 += --with-shared-modules=vfs_zfsacl,vfs_samfs,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex |
0566f2
|
162 |
CONFIGURE_OPTIONS.64 += --with-static-modules= |
4b7e1c
|
163 |
CONFIGURE_OPTIONS.64 += --with-shared-modules= |
b20825
|
164 |
CONFIGURE_OPTIONS += --with-readline |
JS |
165 |
CONFIGURE_OPTIONS += --enable-cups |
|
166 |
CONFIGURE_OPTIONS += --with-aio-support |
|
167 |
CONFIGURE_OPTIONS += --with-acl-support |
|
168 |
CONFIGURE_OPTIONS += --with-ads |
|
169 |
CONFIGURE_OPTIONS += --with-ldap |
|
170 |
CONFIGURE_OPTIONS += --with-automount |
|
171 |
CONFIGURE_OPTIONS += --with-dnsupdate=no |
|
172 |
CONFIGURE_OPTIONS += --with-pam |
|
173 |
CONFIGURE_OPTIONS += --with-winbind |
|
174 |
|
4b7e1c
|
175 |
CONFIGURE_OPTIONS += LD="$(LD)" |
JS |
176 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
177 |
CONFIGURE_OPTIONS.32 += CPPFLAGS="$(CPPFLAGS) -I$(BUILD_DIR)/libsam-LGPL/include" |
|
178 |
CONFIGURE_OPTIONS.64 += CPPFLAGS="$(CPPFLAGS)" |
|
179 |
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
180 |
CONFIGURE_OPTIONS.32 += LIBS="$(LIBS) $(LIBS32)" |
|
181 |
CONFIGURE_OPTIONS.64 += LIBS="$(LIBS)" |
|
182 |
CONFIGURE_OPTIONS += LDAP_LIBS=-lldap60 |
|
183 |
CONFIGURE_OPTIONS += CUPS_CONFIG=$(USRBINDIR)/cups-config |
|
184 |
CONFIGURE_OPTIONS.32 += SAMFS_LIBS="-R/opt/SUNWsamfs/lib -lsam" |
|
185 |
|
|
186 |
# download recent docbook-xsl and unpack it |
|
187 |
$(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep: $(COMPONENT_ARCHIVE_1) \ |
|
188 |
$(SOURCE_DIR)/.prep $(PROTO_DIR)/.mozldap |
|
189 |
cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) |
|
190 |
cd $(DOCS-XML_DIR) ; $(GMAKE) clobber |
|
191 |
$(TOUCH) $@ |
|
192 |
|
|
193 |
# create also the: $(DOCS-XML_DIR)/configure and $(DOCS-XML_DIR)/build/catalog.xml |
|
194 |
# needed to buils docs from XML sources |
|
195 |
$(DOCS-XML_DIR)/Makefile.settings: $(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep |
|
196 |
cd $(@D) ; $(GMAKE) configure \ |
|
197 |
BUILDDIR=$(@D) \ |
|
198 |
DOCBOOKXSLVER=$(COMPONENT_VERSION_1) \ |
|
199 |
DOCBOOKXSLDIR=$(BUILD_DIR)/$(COMPONENT_SRC_1) |
|
200 |
|
|
201 |
# Build docs from DocBook XML sources. |
|
202 |
$(DOCS-XML_DIR)/.built: $(DOCS-XML_DIR)/Makefile.settings |
|
203 |
cd $(@D) ; \ |
|
204 |
env - XML_CATALOG_FILES="catalog.xml file:///$(@D)/build/catalog.xml" \ |
|
205 |
$(GMAKE) smbdotconf/parameters.all.xml manpages3 htmlman3 |
|
206 |
$(TOUCH) $@ |
|
207 |
|
|
208 |
$(PROTO_DIR)/etc/samba/smb.conf-example: $(BUILD_32) |
|
209 |
$(MKDIR) $(@D) |
|
210 |
sed -f $(COMPONENT_DIR)/Solaris/smbconf.sed > $@ \ |
|
211 |
$(BUILD_DIR)/$(MACH32)/examples/smb.conf.default |
|
212 |
|
|
213 |
# Samba targets |
b20825
|
214 |
$(BUILD_32): COMPONENT_BUILD_TARGETS = showlayout all libsmbclient modules smbtorture |
4b7e1c
|
215 |
$(BUILD_64): COMPONENT_BUILD_TARGETS = showlayout nss_modules pam_modules pam_smbpass wins pam_winbind |
JS |
216 |
$(INSTALL_32): COMPONENT_INSTALL_TARGETS = showlayout install-everything |
|
217 |
$(INSTALL_64): COMPONENT_INSTALL_TARGETS = showlayout installpammodules |
|
218 |
|
|
219 |
# common targets |
|
220 |
build: $(BUILD_32_and_64) |
|
221 |
|
|
222 |
include ../../../make-rules/shared-targets.mk |
|
223 |
|
|
224 |
install: $(PROTO_DIR)/etc/samba/smb.conf-example $(INSTALL_32_and_64) |
|
225 |
|
|
226 |
test: $(NO_TESTS) |
|
227 |
|
|
228 |
clean:: |
|
229 |
$(GMAKE) -C $(COMPONENT_DIR)/../mozldap clean |
|
230 |
|
|
231 |
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
232 |
|
|
233 |
include ../../../make-rules/depend.mk |