|
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) 2015, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 include ../../make-rules/shared-macros.mk |
|
27 |
|
28 PATH=/usr/gnu/bin:$(SPRO_VROOT)/bin:/usr/bin |
|
29 |
|
30 ifeq ($(strip $(PARFAIT_BUILD)),yes) |
|
31 PATH=$(PARFAIT_TOOLS):/usr/gnu/bin:$(SPRO_VROOT)/bin:/usr/bin |
|
32 endif |
|
33 |
|
34 COMPONENT_NAME= cyrus-sasl |
|
35 |
|
36 # Prepending $(PKG_SOLARIS_VERSION) to version in package manifest due to |
|
37 # historical versioning, which will also be needed in any possible backports. |
|
38 # This will be changed to $(COMPONENT_VERSION) if the pkg name changes. |
|
39 # openldap.p5m must also be changed if this version format changes. |
|
40 IPS_COMPONENT_VERSION= $(PKG_SOLARIS_VERSION).$(COMPONENT_VERSION) |
|
41 |
|
42 # |
|
43 # If you update the COMPONENT_VERSION, you should make a corresponding change |
|
44 # in the dependency at the bottom of the openldap/openldap.p5m file. |
|
45 # |
|
46 COMPONENT_VERSION= 2.1.26 |
|
47 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
48 COMPONENT_PROJECT_URL= ftp://ftp.cyrusimap.org/cyrus-sasl |
|
49 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
50 COMPONENT_ARCHIVE_HASH= \ |
|
51 sha256:8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3 |
|
52 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/$(COMPONENT_ARCHIVE) |
|
53 |
|
54 # Check DONOTUSE items when updating the version and hash |
|
55 DONOTUSE= $(SOURCE_DIR)/mac $(SOURCE_DIR)/dlcompat-20010505 |
|
56 |
|
57 COMPONENT_BUGDB= library/libsasl |
|
58 |
|
59 TPNO= 21351 |
|
60 |
|
61 CC += $(CC_BITS) |
|
62 |
|
63 SASL2.32 = $(USRLIBDIR)/sasl2 |
|
64 SASL2.64 = $(USRLIBDIR)/sasl2/$(MACH64) |
|
65 SASL_CONFDIR = /etc/sasl |
|
66 PROTO_CONFDIR = $(PROTO_DIR)$(SASL_CONFDIR) |
|
67 |
|
68 include $(WS_TOP)/make-rules/prep.mk |
|
69 CONFIGURE_DEFAULT_DIRS=no |
|
70 include $(WS_TOP)/make-rules/configure.mk |
|
71 include $(WS_TOP)/make-rules/ips.mk |
|
72 include $(WS_TOP)/make-rules/lint-libraries.mk |
|
73 |
|
74 CONFIGURE_ENV += "CPPFLAGS=$(CPPFLAGS) -I/usr/include/openldap" |
|
75 CONFIGURE_OPTIONS += --with-cflags="$(CFLAGS)" |
|
76 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) -lbsm -lscf -lresolv" |
|
77 CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS)) |
|
78 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR) |
|
79 CONFIGURE_OPTIONS += --enable-auth-sasldb=yes |
|
80 CONFIGURE_OPTIONS += --with-dblib=berkeley |
|
81 CONFIGURE_OPTIONS += --with-saslauthd=$(USRSBINDIR)/saslauthd |
|
82 CONFIGURE_OPTIONS += --with-gss_impl=seam |
|
83 CONFIGURE_OPTIONS += --with-gnu-ld=no |
|
84 CONFIGURE_OPTIONS.32 += --with-plugindir=$(SASL2.32) |
|
85 CONFIGURE_OPTIONS.64 += --with-plugindir=$(SASL2.64) |
|
86 CONFIGURE_OPTIONS.32 += --with-sasldir=$(SASL2.32) |
|
87 CONFIGURE_OPTIONS.64 += --with-sasldir=$(SASL2.64) |
|
88 CONFIGURE_OPTIONS += --with-ipctype=doors |
|
89 CONFIGURE_OPTIONS += --with-ldap=$(USRDIR) |
|
90 CONFIGURE_OPTIONS += --enable-sample=yes |
|
91 CONFIGURE_OPTIONS += --with-configdir=$(ETCDIR)/sasl |
|
92 |
|
93 PKG_PROTO_DIRS += $(SOURCE_DIR)/doc $(COMPONENT_DIR)/Solaris |
|
94 |
|
95 # TODO -- make these work or rule them out in Phase II, second integration |
|
96 #CONFIGURE_OPTIONS += --with-dbpath=$(SASL_CONFDIR)/sasl2db |
|
97 #CONFIGURE_OPTIONS += --with-mysql=$????? |
|
98 #CONFIGURE_OPTIONS += --enable-sql=yes |
|
99 #CONFIGURE_OPTIONS += --enable-ldapdb=yes |
|
100 # postfix or AD might need --enable-login and --enable-ntlm |
|
101 #CONFIGURE_OPTIONS += --enable-login=yes |
|
102 #CONFIGURE_OPTIONS += --enable-ntlm=yes |
|
103 # test xalias levels: |
|
104 #CFLAGS += -xalias_level=strict |
|
105 |
|
106 LINTINCDIR= $(SOURCE_DIR)/include/sasl |
|
107 |
|
108 INCLIST= hmac-md5.h \ |
|
109 md5.h \ |
|
110 md5global.h \ |
|
111 prop.h \ |
|
112 sasl.h \ |
|
113 saslplug.h \ |
|
114 saslutil.h |
|
115 |
|
116 CFG_COMPILE=/usr/share/automake-1.15 |
|
117 |
|
118 COMPONENT_PREP_ACTION = ( cd $(@D) && \ |
|
119 ( cd config && ln -s $(CFG_COMPILE)/compile . ) ; \ |
|
120 ( cd saslauthd/config && ln -s $(CFG_COMPILE)/compile . ); \ |
|
121 $(AUTORECONF) -d -m --force -v \ |
|
122 -I $(COMPONENT_DIR)/m4 \ |
|
123 -I $(SOURCE_DIR)/cmulocal \ |
|
124 -I $(SOURCE_DIR)/config ; \ |
|
125 ) |
|
126 |
|
127 # Remove some things we don't use and aren't in the TPNO |
|
128 # Make an include/sasl directory to make llib-lsasl2 match llib-lsasl2.ln |
|
129 COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
130 -$(RM) -r $(DONOTUSE) ; \ |
|
131 $(MKDIR) $(LINTINCDIR) ; \ |
|
132 ( cd $(LINTINCDIR) && \ |
|
133 ( for i in $(INCLIST) ; do \ |
|
134 ln -s ../$$i $$i ; \ |
|
135 done ) \ |
|
136 ) |
|
137 |
|
138 INSTALL_32 += $(PROTOUSRLIBDIR)/libsasl.so.1 |
|
139 INSTALL_64 += $(PROTOUSRLIBDIR64)/libsasl.so.1 |
|
140 |
|
141 |
|
142 # common targets |
|
143 build: $(BUILD_32_and_64) |
|
144 configure: $(BUILD_DIR_32)/.configured $(BUILD_DIR_64)/.configured |
|
145 install: build $(INSTALL_32_and_64) |
|
146 publish: install |
|
147 test: $(NO_TESTS) |
|
148 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
149 |
|
150 $(BUILD_32): COMPONENT_POST_BUILD_ACTION = \ |
|
151 $(LD) -F libsasl2.so.3 -o $(BUILD_DIR)/$(MACH32)/lib/.libs/libsasl.so.1 \ |
|
152 -G -hlibsasl.so.1 -Bdirect -z defs -M$(COMPONENT_DIR)/mapfile |
|
153 |
|
154 $(BUILD_64): COMPONENT_POST_BUILD_ACTION = \ |
|
155 $(LD) -F libsasl2.so.3 -64 -G \ |
|
156 -o $(BUILD_DIR)/$(MACH64)/lib/.libs/libsasl.so.1 \ |
|
157 -hlibsasl.so.1 -Bdirect -Wl,-zdefs -Wl,-M$(COMPONENT_DIR)/mapfile |
|
158 |
|
159 $(PROTOUSRLIBDIR)/libsasl.so.1: $(BUILD_DIR)/$(MACH32)/lib/.libs/libsasl.so.1 |
|
160 $(CP) $< $@ |
|
161 |
|
162 $(PROTOUSRLIBDIR64)/libsasl.so.1: $(BUILD_DIR)/$(MACH64)/lib/.libs/libsasl.so.1 |
|
163 $(CP) $< $@ |
|
164 |
|
165 ASLR_MODE = $(ASLR_ENABLE) |
|
166 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
167 |
|
168 REQUIRED_PACKAGES += database/berkeleydb-5 |
|
169 REQUIRED_PACKAGES += developer/build/automake-115 |
|
170 REQUIRED_PACKAGES += library/openldap |
|
171 REQUIRED_PACKAGES += library/security/openssl |
|
172 REQUIRED_PACKAGES += system/library |
|
173 REQUIRED_PACKAGES += system/library/security/gss |