source: trunk/make/openssl/openssl.mk @ 10142

Letzte Änderung dieser Datei seit 10142 war 10142, erstellt von er13 vor 5 Jahren

openssl:

  • convert to bin package
  • provide openssl binary
Dateigröße: 3.9 KB
Zeile 
1$(call PKG_INIT_BIN,$(if $(FREETZ_OPENSSL_VERSION_0),0.9.8y,1.0.1e))
2$(PKG)_LIB_VERSION:=$(call qstrip,$(FREETZ_OPENSSL_SHLIB_VERSION))
3$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.gz
4$(PKG)_SOURCE_MD5_0.9.8y := 47c7fb37f78c970f1d30aa2f9e9e26d8
5$(PKG)_SOURCE_MD5_1.0.1e := 66bf6f10f060d561929de96f9dfe5b8c
6$(PKG)_SOURCE_MD5        := $($(PKG)_SOURCE_MD5_$($(PKG)_VERSION))
7$(PKG)_SITE:=http://www.openssl.org/source
8$(PKG)_CONDITIONAL_PATCHES+=$($(PKG)_VERSION)
9
10$(PKG)_BINARY_BUILD_DIR := $($(PKG)_DIR)/apps/openssl
11$(PKG)_BINARY_TARGET_DIR := $($(PKG)_DEST_DIR)/usr/bin/openssl
12
13$(PKG)_LIBNAMES_SHORT := libssl libcrypto
14$(PKG)_LIBNAMES_LONG := $($(PKG)_LIBNAMES_SHORT:%=%.so.$($(PKG)_LIB_VERSION))
15
16$(PKG)_LIBS_BUILD_DIR :=$($(PKG)_LIBNAMES_LONG:%=$($(PKG)_DIR)/%)
17$(PKG)_LIBS_STAGING_DIR := $($(PKG)_LIBNAMES_LONG:%=$(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/%)
18$(PKG)_LIBS_TARGET_DIR := $($(PKG)_LIBNAMES_LONG:%=$($(PKG)_TARGET_LIBDIR)/%)
19
20$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_VERSION_0
21$(PKG)_REBUILD_SUBOPTS += FREETZ_OPENSSL_VERSION_1
22
23OPENSSL_NO_CIPHERS := no-idea no-md2 no-mdc2 no-rc2 no-rc5 no-sha0 no-smime no-rmd160 no-aes192 no-ripemd no-camellia no-ans1 no-krb5
24OPENSSL_OPTIONS    := shared no-ec no-err no-fips no-hw no-engines no-sse2 no-capieng no-cms no-seed
25OPENSSL_OPTIONS    += $(if $(FREETZ_OPENSSL_VERSION_0),no-perlasm)
26OPENSSL_OPTIONS    += $(if $(FREETZ_OPENSSL_VERSION_1),no-ec_nistp_64_gcc_128 no-sctp no-srp no-store no-whirlpool)
27
28# Makefile is regenerated by configure
29$(PKG)_CONFIGURE_PRE_CMDS += $(RM) Makefile;
30$(PKG)_CONFIGURE_PRE_CMDS += ln -s Configure configure;
31
32$(PKG)_CONFIGURE_DEFOPTS := n
33$(PKG)_CONFIGURE_OPTIONS += linux-freetz-$(if $(FREETZ_TARGET_ARCH_BE),be,le)$(if $(FREETZ_OPENSSL_VERSION_1),-asm)
34$(PKG)_CONFIGURE_OPTIONS += --prefix=/usr
35$(PKG)_CONFIGURE_OPTIONS += --openssldir=/mod/etc/ssl
36$(PKG)_CONFIGURE_OPTIONS += -DOPENSSL_SMALL_FOOTPRINT
37$(PKG)_CONFIGURE_OPTIONS += $(OPENSSL_NO_CIPHERS)
38$(PKG)_CONFIGURE_OPTIONS += $(OPENSSL_OPTIONS)
39
40$(PKG)_MAKE_FLAGS += -C $(OPENSSL_DIR)
41$(PKG)_MAKE_FLAGS += MAKEDEPPROG="$(TARGET_CC)"
42$(PKG)_MAKE_FLAGS += CC="$(TARGET_CC)"
43$(PKG)_MAKE_FLAGS += AR="$(TARGET_AR) r"
44$(PKG)_MAKE_FLAGS += RANLIB="$(TARGET_RANLIB)"
45$(PKG)_MAKE_FLAGS += NM="$(TARGET_NM)"
46$(PKG)_MAKE_FLAGS += FREETZ_MOD_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)"
47$(PKG)_MAKE_FLAGS += SHARED_LDFLAGS=""
48$(PKG)_MAKE_FLAGS += INSTALL_PREFIX="$(TARGET_TOOLCHAIN_STAGING_DIR)"
49
50$(PKG_SOURCE_DOWNLOAD)
51$(PKG_UNPACKED)
52$(PKG_CONFIGURED_CONFIGURE)
53
54$($(PKG)_BINARY_BUILD_DIR) $($(PKG)_LIBS_BUILD_DIR): $($(PKG)_DIR)/.configured
55#   OpenSSL's "make depend" looks for installed headers before its own,
56#   so remove installed stuff from the staging dir first.
57#   Remove installed libs also from freetz' packages dir to ensure
58#   that it doesn't contain files from previous builds (0.9.8 to/from 1.0.x switch).
59    $(MAKE) openssl-clean-staging openssl-uninstall
60    for target in depend all; do \
61        $(SUBMAKE1) $(OPENSSL_MAKE_FLAGS) $$target; \
62    done
63
64$($(PKG)_LIBS_STAGING_DIR): $($(PKG)_LIBS_BUILD_DIR)
65    $(SUBMAKE) $(OPENSSL_MAKE_FLAGS) install
66    $(call PKG_FIX_LIBTOOL_LA,prefix) \
67        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/pkgconfig/{libcrypto,libssl,openssl}.pc
68
69$($(PKG)_BINARY_TARGET_DIR): $($(PKG)_BINARY_BUILD_DIR)
70    $(INSTALL_BINARY_STRIP)
71
72$($(PKG)_LIBS_TARGET_DIR): $($(PKG)_TARGET_LIBDIR)/%: $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/%
73    $(INSTALL_LIBRARY_STRIP)
74
75$(pkg): $($(PKG)_LIBS_STAGING_DIR)
76
77$(pkg)-precompiled: $($(PKG)_BINARY_TARGET_DIR) $($(PKG)_LIBS_TARGET_DIR)
78
79$(pkg)-clean: $(pkg)-clean-staging
80    -$(SUBMAKE) $(OPENSSL_MAKE_FLAGS) clean
81
82$(pkg)-clean-staging:
83    $(RM) -r \
84        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/bin/openssl* \
85        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/{libssl,libcrypto}* \
86        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/pkgconfig/{libssl,libcrypto,openssl}* \
87        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include/openssl
88
89$(pkg)-uninstall:
90    $(RM) $(OPENSSL_BINARY_TARGET_DIR) $(OPENSSL_TARGET_LIBDIR)/{libssl,libcrypto}*.so*
91
92$(call PKG_ADD_LIB,libcrypto)
93$(PKG_FINISH)
Hinweis: Hilfe zum Repository-Browser finden Sie in TracBrowser.