3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=12cedbeb6813a0d7919dbf1f82134b86
10 PKG_SOURCE_URL
:=http
://www.openssl.org
/source
/ \
11 ftp
://ftp.funet.fi
/pub
/crypt
/cryptography
/libs
/openssl
/source
/ \
12 ftp
://ftp.webmonster.de
/pub
/openssl
/source
/ \
13 ftp
://ftp.sunet.se
/pub
/security
/tools
/net
/openssl
/source
/
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 OPENSSL_NO_CIPHERS
:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192
21 OPENSSL_OPTIONS
:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines
23 include $(TOPDIR
)/package
/rules.mk
25 define Build
/Configure
26 $(SED
) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR
)/Configure
27 $(SED
) s
/OPENWRT_OPTIMIZATION_FLAGS
/$(BR2_TARGET_OPTIMIZATION
)/g
$(PKG_BUILD_DIR
)/Configure
28 (cd
$(PKG_BUILD_DIR
); \
30 .
/Configure linux-openwrt \
32 --openssldir
=/etc
/ssl \
33 -I
$(STAGING_DIR
)/usr
/include \
34 -L
$(STAGING_DIR
)/usr
/lib
-ldl \
35 -DOPENSSL_SMALL_FOOTPRINT \
36 $(OPENSSL_NO_CIPHERS
) \
42 rm -rf
$(PKG_INSTALL_DIR
)
43 mkdir
-p
$(PKG_INSTALL_DIR
)
44 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
45 MAKEDEPPROG
="$(TARGET_CC)" \
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
49 AR
="$(TARGET_CROSS)ar r" \
50 RANLIB
="$(TARGET_CROSS)ranlib" \
52 # Work around openssl build bug to link libssl.so with libcrypto.so.
53 -rm $(PKG_BUILD_DIR
)/libssl.so.
*.
*.
*
54 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
56 CCOPTS
="$(TARGET_CFLAGS) -fomit-frame-pointer" \
58 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
59 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
63 define Build
/InstallDev
64 mkdir
-p
$(STAGING_DIR
)/usr
/include
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/openssl
$(STAGING_DIR
)/usr
/include/
66 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/
67 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
70 define Build
/UninstallDev
72 $(STAGING_DIR
)/usr
/include/openssl \
73 $(STAGING_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.
{a
,so
*}
77 define Package
/libopenssl
80 TITLE
:=Open source SSL libraries
81 DESCRIPTION
:=Open source SSL
(Secure Socket Layer
) libraries
82 URL
:=http
://www.openssl.org
/
85 define Package
/openssl-util
86 $(call Package
/libopenssl
)
88 TITLE
:=OpenSSL command line utilities
89 DESCRIPTION
:=OpenSSL command line utilities
93 define Package
/libopenssl
/install
94 install -d
-m0755
$(1)/usr
/lib
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.so.
* $(1)/usr
/lib
/
96 chmod
0644 $(1)/usr
/lib
/*
99 define Package
/openssl-util
/install
100 install -d
-m0755
$(1)/etc
/ssl
101 $(CP
) $(PKG_INSTALL_DIR
)/etc
/ssl
/openssl.cnf
$(1)/etc
/ssl
/
102 install -d
-m0755
$(1)/etc
/ssl
/certs
103 install -d
-m0755
$(1)/etc
/ssl
/private
104 chmod
0700 $(1)/etc
/ssl
/private
105 install -d
-m0755
$(1)/usr
/bin
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/openssl
$(1)/usr
/bin
/
110 $(eval
$(call BuildPackage
,libopenssl
))
111 $(eval
$(call BuildPackage
,openssl-util
))