OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 6... | Line 6... | |||
6 | # |
6 | # |
|
Line 7... | Line 7... | |||
7 | |
7 | |
|
Line 8... | Line 8... | |||
8 | include $(TOPDIR)/rules.mk |
8 | include $(TOPDIR)/rules.mk |
|
9 | |
9 | |
|
10 | PKG_NAME:=openssl |
10 | PKG_NAME:=openssl |
|
11 | PKG_BASE:=1.1.1 |
11 | PKG_BASE:=1.0.2 |
|
12 | PKG_BUGFIX:=b |
12 | PKG_BUGFIX:=p |
|
13 | PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) |
13 | PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) |
|
14 | PKG_RELEASE:=1 |
- | ||
Line 15... | Line 14... | |||
15 | PKG_USE_MIPS16:=0 |
14 | PKG_RELEASE:=1 |
|
16 | ENGINES_DIR=engines-1.1 |
- | ||
- | 15 | PKG_USE_MIPS16:=0 |
||
Line 17... | Line 16... | |||
17 | |
16 | |
|
18 | PKG_BUILD_PARALLEL:=0 |
17 | PKG_BUILD_PARALLEL:=0 |
|
19 | PKG_BUILD_DEPENDS:=cryptodev-linux |
18 | |
|
20 | |
19 | |
|
21 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
20 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
|
22 | PKG_SOURCE_URL:= \ |
21 | PKG_SOURCE_URL:= \ |
|
23 | http://ftp.fi.muni.cz/pub/openssl/source/ \ |
22 | http://ftp.fi.muni.cz/pub/openssl/source/ \ |
|
24 | http://ftp.linux.hr/pub/openssl/source/ \ |
23 | http://ftp.linux.hr/pub/openssl/source/ \ |
|
Line 25... | Line 24... | |||
25 | ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ |
24 | http://gd.tuwien.ac.at/infosys/security/openssl/source/ \ |
|
26 | http://www.openssl.org/source/ \ |
25 | http://www.openssl.org/source/ \ |
|
27 | http://www.openssl.org/source/old/$(PKG_BASE)/ |
26 | http://www.openssl.org/source/old/$(PKG_BASE)/ |
|
28 | PKG_HASH:=5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b |
27 | PKG_HASH:=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 |
|
29 | |
- | ||
30 | PKG_LICENSE:=OpenSSL |
28 | |
|
31 | PKG_LICENSE_FILES:=LICENSE |
- | ||
32 | PKG_CPE_ID:=cpe:/a:openssl:openssl |
- | ||
33 | PKG_CONFIG_DEPENDS:= \ |
- | ||
34 | CONFIG_OPENSSL_ENGINE \ |
- | ||
35 | CONFIG_OPENSSL_ENGINE_CRYPTO \ |
- | ||
36 | CONFIG_OPENSSL_NO_DEPRECATED \ |
- | ||
37 | CONFIG_OPENSSL_OPTIMIZE_SPEED \ |
- | ||
38 | CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM \ |
- | ||
39 | CONFIG_OPENSSL_WITH_ARIA \ |
- | ||
40 | CONFIG_OPENSSL_WITH_ASM \ |
- | ||
41 | CONFIG_OPENSSL_WITH_ASYNC \ |
- | ||
42 | CONFIG_OPENSSL_WITH_BLAKE2 \ |
29 | PKG_LICENSE:=OpenSSL |
|
43 | CONFIG_OPENSSL_WITH_CAMELLIA \ |
30 | PKG_LICENSE_FILES:=LICENSE |
|
44 | CONFIG_OPENSSL_WITH_CHACHA_POLY1305 \ |
31 | PKG_CPE_ID:=cpe:/a:openssl:openssl |
|
45 | CONFIG_OPENSSL_WITH_CMS \ |
32 | PKG_CONFIG_DEPENDS:= \ |
|
- | 33 | CONFIG_OPENSSL_ENGINE_CRYPTO \ |
||
46 | CONFIG_OPENSSL_WITH_COMPRESSION \ |
34 | CONFIG_OPENSSL_ENGINE_DIGEST \ |
|
47 | CONFIG_OPENSSL_WITH_DTLS \ |
35 | CONFIG_OPENSSL_WITH_EC \ |
|
48 | CONFIG_OPENSSL_WITH_EC \ |
36 | CONFIG_OPENSSL_WITH_EC2M \ |
|
49 | CONFIG_OPENSSL_WITH_EC2M \ |
37 | CONFIG_OPENSSL_WITH_SSL3 \ |
|
50 | CONFIG_OPENSSL_WITH_ERROR_MESSAGES \ |
38 | CONFIG_OPENSSL_HARDWARE_SUPPORT \ |
|
51 | CONFIG_OPENSSL_WITH_GOST \ |
- | ||
52 | CONFIG_OPENSSL_WITH_IDEA \ |
- | ||
53 | CONFIG_OPENSSL_WITH_MDC2 \ |
- | ||
54 | CONFIG_OPENSSL_WITH_NPN \ |
39 | CONFIG_OPENSSL_WITH_DEPRECATED \ |
|
55 | CONFIG_OPENSSL_WITH_PSK \ |
40 | CONFIG_OPENSSL_WITH_DTLS \ |
|
56 | CONFIG_OPENSSL_WITH_RFC3779 \ |
- | ||
57 | CONFIG_OPENSSL_WITH_SEED \ |
- | ||
Line 58... | Line 41... | |||
58 | CONFIG_OPENSSL_WITH_SM234 \ |
41 | CONFIG_OPENSSL_WITH_COMPRESSION \ |
|
Line 59... | Line 42... | |||
59 | CONFIG_OPENSSL_WITH_SRP \ |
42 | CONFIG_OPENSSL_WITH_NPN \ |
|
60 | CONFIG_OPENSSL_WITH_SSE2 \ |
43 | CONFIG_OPENSSL_WITH_PSK \ |
|
Line 69... | Line 52... | |||
69 | endif |
52 | endif |
|
Line 70... | Line 53... | |||
70 | |
53 | |
|
71 | define Package/openssl/Default |
54 | define Package/openssl/Default |
|
72 | TITLE:=Open source SSL toolkit |
55 | TITLE:=Open source SSL toolkit |
|
73 | URL:=http://www.openssl.org/ |
- | ||
74 | SECTION:=libs |
- | ||
75 | CATEGORY:=Libraries |
56 | URL:=http://www.openssl.org/ |
|
Line 76... | Line 57... | |||
76 | endef |
57 | endef |
|
77 | |
58 | |
|
78 | define Package/libopenssl/config |
59 | define Package/libopenssl/config |
|
Line 79... | Line 60... | |||
79 | source "$(SOURCE)/Config.in" |
60 | source "$(SOURCE)/Config.in" |
|
80 | endef |
61 | endef |
|
81 | |
62 | |
|
82 | define Package/openssl/Default/description |
63 | define Package/openssl/Default/description |
|
83 | The OpenSSL Project is a collaborative effort to develop a robust, |
64 | The OpenSSL Project is a collaborative effort to develop a robust, |
|
84 | commercial-grade, full-featured, and Open Source toolkit implementing the |
65 | commercial-grade, full-featured, and Open Source toolkit implementing the Secure |
|
Line 85... | Line 66... | |||
85 | Transport Layer Security (TLS) protocol as well as a full-strength |
66 | Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well |
|
86 | general-purpose cryptography library. |
67 | as a full-strength general purpose cryptography library. |
|
- | 68 | endef |
||
87 | endef |
69 | |
|
- | 70 | define Package/libopenssl |
||
88 | |
71 | $(call Package/openssl/Default) |
|
89 | define Package/libopenssl |
72 | SECTION:=libs |
|
90 | $(call Package/openssl/Default) |
73 | SUBMENU:=SSL |
|
91 | SUBMENU:=SSL |
74 | CATEGORY:=Libraries |
|
92 | DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib |
75 | DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib |
|
Line 93... | Line 76... | |||
93 | TITLE+= (libraries) |
76 | TITLE+= (libraries) |
|
94 | ABI_VERSION:=1.1 |
77 | ABI_VERSION:=$(PKG_VERSION) |
|
Line 102... | Line 85... | |||
102 | |
85 | |
|
103 | define Package/openssl-util |
86 | define Package/openssl-util |
|
104 | $(call Package/openssl/Default) |
87 | $(call Package/openssl/Default) |
|
105 | SECTION:=utils |
88 | SECTION:=utils |
|
106 | CATEGORY:=Utilities |
89 | CATEGORY:=Utilities |
|
107 | DEPENDS:=+libopenssl +libopenssl-conf |
90 | DEPENDS:=+libopenssl |
|
108 | TITLE+= (utility) |
91 | TITLE+= (utility) |
|
Line 109... | Line -... | |||
109 | endef |
- | ||
110 | |
- | ||
111 | define Package/openssl-util/description |
- | ||
112 | $(call Package/openssl/Default/description) |
- | ||
113 | This package contains the OpenSSL command-line utility. |
- | ||
114 | endef |
- | ||
115 | |
- | ||
116 | define Package/libopenssl-conf |
- | ||
117 | $(call Package/openssl/Default) |
- | ||
118 | SUBMENU:=SSL |
- | ||
119 | TITLE:=/etc/ssl/openssl.cnf config file |
- | ||
120 | DEPENDS:=libopenssl |
- | ||
121 | endef |
92 | endef |
|
122 | |
93 | |
|
123 | define Package/libopenssl-conf/conffiles |
94 | define Package/openssl-util/conffiles |
|
Line 124... | Line 95... | |||
124 | /etc/ssl/openssl.cnf |
95 | /etc/ssl/openssl.cnf |
|
125 | endef |
96 | endef |
|
126 | |
97 | |
|
127 | define Package/libopenssl-conf/description |
- | ||
128 | $(call Package/openssl/Default/description) |
- | ||
129 | This package installs the OpenSSL configuration file /etc/ssl/openssl.cnf. |
- | ||
130 | endef |
- | ||
131 | |
- | ||
132 | define Package/libopenssl-afalg |
- | ||
133 | $(call Package/openssl/Default) |
- | ||
134 | SUBMENU:=SSL |
- | ||
135 | TITLE:=AFALG hardware acceleration engine |
- | ||
136 | DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO @!LINUX_3_18 +kmod-crypto-user \ |
- | ||
137 | +libopenssl-conf |
- | ||
138 | endef |
- | ||
139 | |
- | ||
140 | define Package/libopenssl-afalg/description |
- | ||
141 | This package adds an engine that enables hardware acceleration |
- | ||
142 | through the AF_ALG kernel interface. |
- | ||
143 | To use it, you need to configure the engine in /etc/ssl/openssl.cnf |
- | ||
144 | See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module |
- | ||
145 | The engine_id is "afalg" |
- | ||
146 | endef |
- | ||
147 | |
- | ||
148 | define Package/libopenssl-padlock |
- | ||
149 | $(call Package/openssl/Default) |
- | ||
150 | SUBMENU:=SSL |
- | ||
151 | TITLE:=VIA Padlock hardware acceleration engine |
- | ||
152 | DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +kmod-crypto-hw-padlock \ |
- | ||
153 | +libopenssl-conf |
- | ||
154 | endef |
- | ||
155 | |
- | ||
156 | define Package/libopenssl-padlock/description |
- | ||
157 | This package adds an engine that enables VIA Padlock hardware acceleration. |
- | ||
158 | To use it, you need to configure it in /etc/ssl/openssl.cnf. |
98 | define Package/openssl-util/description |
|
Line 159... | Line -... | |||
159 | See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module |
- | ||
Line -... | Line 99... | |||
- | 99 | $(call Package/openssl/Default/description) |
||
160 | The engine_id is "padlock" |
100 | This package contains the OpenSSL command-line utility. |
|
161 | endef |
101 | endef |
|
162 | |
- | ||
163 | OPENSSL_OPTIONS:= shared |
102 | |
|
164 | |
103 | |
|
165 | ifndef CONFIG_OPENSSL_WITH_BLAKE2 |
104 | OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-camellia no-krb5 \ |
|
166 | OPENSSL_OPTIONS += no-blake2 |
- | ||
167 | endif |
105 | no-whrlpool no-whirlpool no-seed no-jpake |
|
168 | |
106 | OPENSSL_OPTIONS:= shared no-err no-sse2 no-ssl2 no-ssl2-method no-heartbeats |
|
169 | ifndef CONFIG_OPENSSL_WITH_CHACHA_POLY1305 |
107 | |
|
170 | OPENSSL_OPTIONS += no-chacha no-poly1305 |
108 | ifdef CONFIG_OPENSSL_ENGINE_CRYPTO |
|
171 | else |
- | ||
172 | ifdef CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM |
- | ||
173 | OPENSSL_OPTIONS += -DOPENSSL_PREFER_CHACHA_OVER_GCM |
109 | OPENSSL_OPTIONS += -DHAVE_CRYPTODEV |
|
174 | endif |
110 | ifdef CONFIG_OPENSSL_ENGINE_DIGEST |
|
Line 175... | Line 111... | |||
175 | endif |
111 | OPENSSL_OPTIONS += -DUSE_CRYPTODEV_DIGESTS |
|
176 | |
112 | endif |
|
177 | ifndef CONFIG_OPENSSL_WITH_ASYNC |
113 | else |
|
Line 178... | Line 114... | |||
178 | OPENSSL_OPTIONS += no-async |
114 | OPENSSL_OPTIONS += no-engines |
|
179 | endif |
115 | endif |
|
180 | |
116 | |
|
Line 181... | Line -... | |||
181 | ifndef CONFIG_OPENSSL_WITH_EC |
- | ||
182 | OPENSSL_OPTIONS += no-ec |
- | ||
183 | endif |
- | ||
184 | |
- | ||
185 | ifndef CONFIG_OPENSSL_WITH_EC2M |
117 | ifndef CONFIG_OPENSSL_WITH_EC |
|
186 | OPENSSL_OPTIONS += no-ec2m |
- | ||
187 | endif |
- | ||
188 | |
- | ||
189 | ifndef CONFIG_OPENSSL_WITH_ERROR_MESSAGES |
- | ||
190 | OPENSSL_OPTIONS += no-err |
- | ||
191 | endif |
- | ||
192 | |
- | ||
193 | ifndef CONFIG_OPENSSL_WITH_TLS13 |
- | ||
194 | OPENSSL_OPTIONS += no-tls1_3 |
118 | OPENSSL_OPTIONS += no-ec |
|
195 | endif |
- | ||
196 | |
- | ||
197 | ifndef CONFIG_OPENSSL_WITH_ARIA |
- | ||
198 | OPENSSL_OPTIONS += no-aria |
- | ||
199 | endif |
- | ||
200 | |
- | ||
201 | ifndef CONFIG_OPENSSL_WITH_SM234 |
- | ||
202 | OPENSSL_OPTIONS += no-sm2 no-sm3 no-sm4 |
- | ||
203 | endif |
- | ||
204 | |
- | ||
205 | ifndef CONFIG_OPENSSL_WITH_CAMELLIA |
- | ||
206 | OPENSSL_OPTIONS += no-camellia |
- | ||
207 | endif |
119 | endif |
|
Line 208... | Line 120... | |||
208 | |
120 | |
|
209 | ifndef CONFIG_OPENSSL_WITH_IDEA |
121 | ifndef CONFIG_OPENSSL_WITH_EC2M |
|
210 | OPENSSL_OPTIONS += no-idea |
122 | OPENSSL_OPTIONS += no-ec2m |
|
Line 211... | Line -... | |||
211 | endif |
- | ||
212 | |
- | ||
213 | ifndef CONFIG_OPENSSL_WITH_SEED |
- | ||
214 | OPENSSL_OPTIONS += no-seed |
- | ||
215 | endif |
- | ||
216 | |
- | ||
217 | ifndef CONFIG_OPENSSL_WITH_MDC2 |
- | ||
218 | OPENSSL_OPTIONS += no-mdc2 |
- | ||
219 | endif |
- | ||
220 | |
- | ||
221 | ifndef CONFIG_OPENSSL_WITH_WHIRLPOOL |
- | ||
222 | OPENSSL_OPTIONS += no-whirlpool |
- | ||
223 | endif |
123 | endif |
|
224 | |
124 | |
|
225 | ifndef CONFIG_OPENSSL_WITH_CMS |
125 | ifndef CONFIG_OPENSSL_WITH_SSL3 |
|
Line 226... | Line -... | |||
226 | OPENSSL_OPTIONS += no-cms |
- | ||
227 | endif |
- | ||
228 | |
- | ||
229 | ifndef CONFIG_OPENSSL_WITH_RFC3779 |
- | ||
230 | OPENSSL_OPTIONS += no-rfc3779 |
- | ||
231 | endif |
- | ||
232 | |
- | ||
233 | ifdef CONFIG_OPENSSL_NO_DEPRECATED |
- | ||
234 | OPENSSL_OPTIONS += no-deprecated |
- | ||
235 | endif |
- | ||
236 | |
- | ||
237 | ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y) |
- | ||
238 | TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 |
- | ||
239 | else |
- | ||
240 | OPENSSL_OPTIONS += -DOPENSSL_SMALL_FOOTPRINT |
- | ||
241 | endif |
- | ||
242 | |
- | ||
243 | ifdef CONFIG_OPENSSL_ENGINE |
- | ||
244 | ifdef CONFIG_OPENSSL_ENGINE_CRYPTO |
- | ||
245 | OPENSSL_OPTIONS += enable-devcryptoeng |
- | ||
246 | endif |
- | ||
247 | ifndef CONFIG_PACKAGE_libopenssl-afalg |
- | ||
248 | OPENSSL_OPTIONS += no-afalgeng |
- | ||
249 | endif |
- | ||
250 | ifndef CONFIG_PACKAGE_libopenssl-padlock |
126 | OPENSSL_OPTIONS += no-ssl3 no-ssl3-method |
|
251 | OPENSSL_OPTIONS += no-hw-padlock |
127 | endif |
|
252 | endif |
128 | |
|
Line 253... | Line 129... | |||
253 | else |
129 | ifndef CONFIG_OPENSSL_HARDWARE_SUPPORT |
|
Line 278... | Line 154... | |||
278 | |
154 | |
|
279 | ifndef CONFIG_OPENSSL_WITH_SRP |
155 | ifndef CONFIG_OPENSSL_WITH_SRP |
|
280 | OPENSSL_OPTIONS += no-srp |
156 | OPENSSL_OPTIONS += no-srp |
|
Line 281... | Line 157... | |||
281 | endif |
157 | endif |
|
282 | |
158 | |
|
283 | ifndef CONFIG_OPENSSL_WITH_ASM |
159 | ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y) |
|
Line 284... | Line 160... | |||
284 | OPENSSL_OPTIONS += no-asm |
160 | TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS)) -O3 |
|
- | 161 | endif |
||
- | 162 | |
||
- | 163 | ifeq ($(CONFIG_x86_64),y) |
||
- | 164 | OPENSSL_TARGET:=linux-x86_64-openwrt |
||
285 | endif |
165 | OPENSSL_MAKEFLAGS += LIBDIR=lib |
|
- | 166 | else |
||
- | 167 | OPENSSL_OPTIONS+=no-sse2 |
||
- | 168 | ifeq ($(CONFIG_mips)$(CONFIG_mipsel),y) |
||
- | 169 | OPENSSL_TARGET:=linux-mips-openwrt |
||
- | 170 | else ifeq ($(CONFIG_aarch64),y) |
||
- | 171 | OPENSSL_TARGET:=linux-aarch64-openwrt |
||
- | 172 | else ifeq ($(CONFIG_arm)$(CONFIG_armeb),y) |
||
286 | |
173 | OPENSSL_TARGET:=linux-armv4-openwrt |
|
287 | ifdef CONFIG_i386 |
174 | else |
|
288 | ifndef CONFIG_OPENSSL_WITH_SSE2 |
175 | OPENSSL_TARGET:=linux-generic-openwrt |
|
Line 289... | Line -... | |||
289 | OPENSSL_OPTIONS += no-sse2 |
- | ||
290 | endif |
- | ||
291 | endif |
176 | OPENSSL_OPTIONS+=no-perlasm |
|
Line 292... | Line 177... | |||
292 | |
177 | endif |
|
- | 178 | endif |
||
- | 179 | |
||
- | 180 | STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | mkhash md5) |
||
- | 181 | |
||
293 | OPENSSL_TARGET:=linux-$(call qstrip,$(CONFIG_ARCH))-openwrt |
182 | define Build/Configure |
|
294 | |
183 | [ -f $(STAMP_CONFIGURED) ] || { \ |
|
295 | STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | mkhash md5) |
184 | rm -f $(PKG_BUILD_DIR)/*.so.* $(PKG_BUILD_DIR)/*.a; \ |
|
296 | |
- | ||
297 | define Build/Configure |
185 | find $(PKG_BUILD_DIR) -name \*.o | xargs rm -f; \ |
|
298 | (cd $(PKG_BUILD_DIR); \ |
186 | } |
|
299 | ./Configure $(OPENSSL_TARGET) \ |
187 | (cd $(PKG_BUILD_DIR); \ |
|
- | 188 | ./Configure $(OPENSSL_TARGET) \ |
||
300 | --prefix=/usr \ |
189 | --prefix=/usr \ |
|
301 | --libdir=lib \ |
190 | --openssldir=/etc/ssl \ |
|
302 | --openssldir=/etc/ssl \ |
191 | $(TARGET_CPPFLAGS) \ |
|
- | 192 | $(TARGET_LDFLAGS) -ldl \ |
||
- | 193 | $(if $(CONFIG_OPENSSL_OPTIMIZE_SPEED),,-DOPENSSL_SMALL_FOOTPRINT) \ |
||
- | 194 | $(OPENSSL_NO_CIPHERS) \ |
||
- | 195 | $(OPENSSL_OPTIONS) \ |
||
- | 196 | ) |
||
- | 197 | +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ |
||
303 | $(TARGET_CPPFLAGS) \ |
198 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
|
Line 304... | Line 199... | |||
304 | $(TARGET_LDFLAGS) \ |
199 | MAKEDEPPROG="$(TARGET_CROSS)gcc" \ |
|
305 | $(OPENSSL_OPTIONS) && \ |
200 | OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ |
|
Line 306... | Line 201... | |||
306 | { [ -f $(STAMP_CONFIGURED) ] || make clean; } \ |
201 | $(OPENSSL_MAKEFLAGS) \ |
|
307 | ) |
202 | depend |
|
308 | endef |
203 | endef |
|
309 | |
204 | |
|
- | 205 | TARGET_CFLAGS += $(FPIC) -I$(CURDIR)/include -ffunction-sections -fdata-sections |
||
- | 206 | TARGET_LDFLAGS += -Wl,--gc-sections |
||
310 | TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections |
207 | |
|
311 | TARGET_LDFLAGS += -Wl,--gc-sections |
208 | define Build/Compile |
|
312 | |
209 | +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ |
|
313 | define Build/Compile |
210 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
|
- | 211 | CC="$(TARGET_CC)" \ |
||
- | 212 | ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \ |
||
- | 213 | AR="$(TARGET_CROSS)ar r" \ |
||
- | 214 | RANLIB="$(TARGET_CROSS)ranlib" \ |
||
- | 215 | OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ |
||
- | 216 | $(OPENSSL_MAKEFLAGS) \ |
||
- | 217 | all |
||
- | 218 | +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ |
||
- | 219 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
||
- | 220 | CC="$(TARGET_CC)" \ |
||
- | 221 | ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \ |
||
- | 222 | AR="$(TARGET_CROSS)ar r" \ |
||
- | 223 | RANLIB="$(TARGET_CROSS)ranlib" \ |
||
- | 224 | OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ |
||
- | 225 | $(OPENSSL_MAKEFLAGS) \ |
||
- | 226 | build-shared |
||
- | 227 | # Work around openssl build bug to link libssl.so with libcrypto.so. |
||
314 | +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ |
228 | -rm $(PKG_BUILD_DIR)/libssl.so.*.*.* |
|
315 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
229 | +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ |
|
316 | CC="$(TARGET_CC)" \ |
230 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
|
317 | SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ |
231 | CC="$(TARGET_CC)" \ |
|
318 | OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ |
232 | OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \ |
|
319 | $(OPENSSL_MAKEFLAGS) \ |
233 | $(OPENSSL_MAKEFLAGS) \ |
|
320 | all |
234 | do_linux-shared |
|
Line 321... | Line 235... | |||
321 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
235 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
|
322 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
236 | CROSS_COMPILE="$(TARGET_CROSS)" \ |
|
323 | CC="$(TARGET_CC)" \ |
237 | CC="$(TARGET_CC)" \ |
|
Line 335... | Line 249... | |||
335 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc $(1)/usr/lib/pkgconfig/ |
249 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc $(1)/usr/lib/pkgconfig/ |
|
336 | [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc || true |
250 | [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc || true |
|
337 | endef |
251 | endef |
|
Line 338... | Line 252... | |||
338 | |
252 | |
|
339 | define Package/libopenssl/install |
- | ||
340 | $(INSTALL_DIR) $(1)/etc/ssl/certs |
- | ||
341 | $(INSTALL_DIR) $(1)/etc/ssl/private |
- | ||
342 | chmod 0700 $(1)/etc/ssl/private |
253 | define Package/libopenssl/install |
|
343 | $(INSTALL_DIR) $(1)/usr/lib |
254 | $(INSTALL_DIR) $(1)/usr/lib |
|
344 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcrypto.so.* $(1)/usr/lib/ |
255 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcrypto.so.* $(1)/usr/lib/ |
|
345 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libssl.so.* $(1)/usr/lib/ |
- | ||
346 | $(if $(CONFIG_OPENSSL_ENGINE),$(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)) |
256 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libssl.so.* $(1)/usr/lib/ |
|
Line 347... | Line 257... | |||
347 | endef |
257 | endef |
|
348 | |
258 | |
|
349 | define Package/libopenssl-conf/install |
259 | define Package/openssl-util/install |
|
350 | $(INSTALL_DIR) $(1)/etc/ssl |
260 | $(INSTALL_DIR) $(1)/etc/ssl |
|
351 | $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ |
- | ||
- | 261 | $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/ |
||
352 | endef |
262 | $(INSTALL_DIR) $(1)/etc/ssl/certs |
|
353 | |
263 | $(INSTALL_DIR) $(1)/etc/ssl/private |
|
354 | define Package/openssl-util/install |
264 | chmod 0700 $(1)/etc/ssl/private |
|
355 | $(INSTALL_DIR) $(1)/usr/bin |
265 | $(INSTALL_DIR) $(1)/usr/bin |
|
Line 356... | Line -... | |||
356 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/ |
- | ||
357 | endef |
- | ||
358 | |
- | ||
359 | define Package/libopenssl-afalg/install |
- | ||
360 | $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) |
- | ||
361 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR) |
- | ||
362 | endef |
- | ||
363 | |
- | ||
364 | define Package/libopenssl-padlock/install |
- | ||
365 | $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) |
- | ||
366 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR) |
266 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/ |
|
367 | endef |
- | ||
368 | |
- | ||
369 | $(eval $(call BuildPackage,libopenssl)) |
- | ||
370 | $(eval $(call BuildPackage,libopenssl-conf)) |
267 | endef |