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 include ../../../make-rules/shared-macros.mk |
|
27 |
|
28 # Motivation: |
|
29 # Application released under GPLv2 can not link GPLv3 libraries so the original |
|
30 # libsmbclient API from samba 3.0.x released under the GPLv2 should also be |
|
31 # provided for such apps. |
|
32 # Currently only JDS part called gnome-VFS is using libsmbclient under the |
|
33 # LSARC/2006/350/commitment.materials/materials/contracts/PSARC-2000-488-samba.txt |
|
34 # |
|
35 COMPONENT_NAME= samba |
|
36 COMPONENT_VERSION= 3.0.37 |
|
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
38 COMPONENT_PROJECT_URL= http://www.samba.org/ |
|
39 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
40 COMPONENT_ARCHIVE_HASH= \ |
|
41 sha256:bb67c0e13d4ccbd84b9200c8739393fdd9b3145b5aad216934dc670f0fcea266 |
|
42 COMPONENT_ARCHIVE_URL= http://www.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE) |
|
43 COMPONENT_BUGDB= utility/samba |
|
44 |
|
45 TPNO_LIBSMBCLIENT= 17765 |
|
46 TPNO_MOZLDAP= 4457 |
|
47 |
|
48 include $(WS_MAKE_RULES)/prep.mk |
|
49 |
|
50 SRC_OFFSET = source |
|
51 BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/$(SRC_OFFSET) |
|
52 |
|
53 include $(WS_MAKE_RULES)/configure.mk |
|
54 include $(WS_MAKE_RULES)/ips.mk |
|
55 |
|
56 CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure |
|
57 |
|
58 # Build mozldap if not yet built. |
|
59 $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
|
60 $(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed: |
|
61 $(GMAKE) -C $(COMPONENT_DIR)/../mozldap install |
|
62 |
|
63 # Clone mozldap libs and headers to $(PROTO_DIR). |
|
64 # Create also $(PROTO_DIR). |
|
65 $(PROTO_DIR)/.mozldap: $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \ |
|
66 $(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed |
|
67 $(MKDIR) $(PROTO_DIR) |
|
68 $(CLONEY) $(COMPONENT_DIR)/../mozldap/build/prototype/$(MACH) $(PROTO_DIR) |
|
69 $(TOUCH) $@ |
|
70 |
|
71 # Hook dependency on mozldap here. |
|
72 $(BUILD_DIR_32)/.configured: $(PROTO_DIR)/.mozldap |
|
73 |
|
74 # re-create configure dir with respect of SRC_OFFSET |
|
75 # (target $(BUILD_DIR_64)/.configured does not know about |
|
76 # the lower level of directories) |
|
77 COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
78 $(RM) -r $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
79 $(MKDIR) $(BUILD_DIR)/$(MACH$(BITS)) ; |
|
80 |
|
81 # Clone SOURCE_DIR and remove links to all of the files generated |
|
82 # from *.in to distinguish then between the 32/64bits builds. |
|
83 COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
84 ( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) ; \ |
|
85 find $(@D)/.. -name '*.in' | sed -e 's/.in$$//' | xargs $(RM) ) ; \ |
|
86 |
|
87 # create bin ...Samba forgot to create it if it is not doing full build |
|
88 COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
89 $(MKDIR) $(@D)/bin ; |
|
90 |
|
91 # finish preparation |
|
92 COMPONENT_PRE_CONFIGURE_ACTION += \ |
|
93 ( cd $(@D) ; $(CONFIG_SHELL) autogen.sh ) |
|
94 |
|
95 # local settings |
|
96 CPPFLAGS += -I$(PROTOINCDIR)/samba/ldap6 |
|
97 LDFLAGS += -L $(PROTOUSRLIBDIR) |
|
98 LIBS += -lrt -lsocket -lnsl |
|
99 CFLAGS += $(studio_C99_ENABLE) |
|
100 CFLAGS += $(CFLAGS.studio) |
|
101 |
|
102 CONFIGURE_PREFIX = /usr/sfw |
|
103 CONFIGURE_OPTIONS += --with-configdir=/etc/sfw |
|
104 CONFIGURE_OPTIONS += --with-privatedir=/etc/sfw/private |
|
105 CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks |
|
106 CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks |
|
107 CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log |
|
108 CONFIGURE_OPTIONS += --without-readline |
|
109 CONFIGURE_OPTIONS += --enable-shared=yes |
|
110 CONFIGURE_OPTIONS += --enable-static=no |
|
111 CONFIGURE_OPTIONS += --with-static-modules= |
|
112 CONFIGURE_OPTIONS += --with-shared-modules= |
|
113 CONFIGURE_OPTIONS += --with-acl-support |
|
114 CONFIGURE_OPTIONS += --with-ldap |
|
115 CONFIGURE_OPTIONS += --with-krb5 |
|
116 CONFIGURE_OPTIONS += --with-ads |
|
117 CONFIGURE_OPTIONS += --with-pam |
|
118 CONFIGURE_OPTIONS += --with-automount |
|
119 CONFIGURE_OPTIONS += --with-libsmbclient |
|
120 CONFIGURE_OPTIONS += --with-sys-quotas=no |
|
121 CONFIGURE_OPTIONS += --with-acl-support |
|
122 CONFIGURE_OPTIONS += --with-aio-support |
|
123 CONFIGURE_OPTIONS += --with-winbind |
|
124 |
|
125 CONFIGURE_OPTIONS += LD="$(LD)" |
|
126 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
|
127 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
128 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
129 CONFIGURE_OPTIONS += LIBS="$(LIBS)" |
|
130 CONFIGURE_OPTIONS += LDAP_LIBS=-lldap60 |
|
131 CONFIGURE_OPTIONS += CUPS_CONFIG=$(USRBINDIR)/cups-config |
|
132 |
|
133 COMPONENT_BUILD_TARGETS = libsmbclient |
|
134 COMPONENT_INSTALL_TARGETS = installclientlib |
|
135 |
|
136 # Do not apply the standard license transforms for this component. The |
|
137 # license actions in the samba.p5m file are already tagged with the |
|
138 # attributes. |
|
139 LICENSE_TRANSFORMS = |
|
140 |
|
141 ASLR_MODE = $(ASLR_NOT_APPLICABLE) |
|
142 |
|
143 # common targets |
|
144 configure: $(CONFIGURE_32) |
|
145 |
|
146 build: $(BUILD_32) |
|
147 |
|
148 install: $(INSTALL_32) |
|
149 |
|
150 test: $(NO_TESTS) |
|
151 |
|
152 system-test: $(NO_TESTS) |
|
153 |
|
154 clean:: |
|
155 $(GMAKE) -C $(COMPONENT_DIR)/../mozldap clean |
|
156 |
|
157 REQUIRED_PACKAGES += library/nspr |
|
158 REQUIRED_PACKAGES += library/openldap |
|
159 REQUIRED_PACKAGES += library/security/nss |
|
160 REQUIRED_PACKAGES += service/security/kerberos-5 |
|
161 REQUIRED_PACKAGES += system/library |
|