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 Package
/libopenssl
28 TITLE
:=Open source SSL libraries
30 DESCRIPTION
:=Open source SSL
(Secure Socket Layer
) libraries
31 URL
:=http
://www.openssl.org
/
34 define Package
/openssl-util
35 $(call Package
/libopenssl
)
37 TITLE
:=OpenSSL command line utilities
38 DESCRIPTION
:=OpenSSL command line utilities
41 define Package
/openssl-util
/conffiles
45 define Build
/Configure
46 $(SED
) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR
)/Configure
47 $(SED
) s
/OPENWRT_OPTIMIZATION_FLAGS
/$(BR2_TARGET_OPTIMIZATION
)/g
$(PKG_BUILD_DIR
)/Configure
48 (cd
$(PKG_BUILD_DIR
); \
50 .
/Configure linux-openwrt \
52 --openssldir
=/etc
/ssl \
53 -I
$(STAGING_DIR
)/usr
/include \
54 -L
$(STAGING_DIR
)/usr
/lib
-ldl \
55 -DOPENSSL_SMALL_FOOTPRINT \
56 $(OPENSSL_NO_CIPHERS
) \
62 rm -rf
$(PKG_INSTALL_DIR
)
63 mkdir
-p
$(PKG_INSTALL_DIR
)
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
65 MAKEDEPPROG
="$(TARGET_CC)" \
67 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
69 AR
="$(TARGET_CROSS)ar r" \
70 RANLIB
="$(TARGET_CROSS)ranlib" \
72 # Work around openssl build bug to link libssl.so with libcrypto.so.
73 -rm $(PKG_BUILD_DIR
)/libssl.so.
*.
*.
*
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
76 CCOPTS
="$(TARGET_CFLAGS) -fomit-frame-pointer" \
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) -j1 \
79 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
83 define Build
/InstallDev
84 mkdir
-p
$(STAGING_DIR
)/usr
/include
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/openssl
$(STAGING_DIR
)/usr
/include/
86 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
90 define Build
/UninstallDev
91 rm -rf
$(STAGING_DIR
)/usr
/include/openssl \
92 $(STAGING_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.
{a
,so
*}
95 define Package
/libopenssl
/install
96 install -d
-m0755
$(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.so.
* $(1)/usr
/lib
/
98 chmod
0644 $(1)/usr
/lib
/*
101 define Package
/openssl-util
/install
102 install -d
-m0755
$(1)/etc
/ssl
103 $(CP
) $(PKG_INSTALL_DIR
)/etc
/ssl
/openssl.cnf
$(1)/etc
/ssl
/
104 install -d
-m0755
$(1)/etc
/ssl
/certs
105 install -d
-m0755
$(1)/etc
/ssl
/private
106 chmod
0700 $(1)/etc
/ssl
/private
107 install -d
-m0755
$(1)/usr
/bin
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/openssl
$(1)/usr
/bin
/
111 $(eval
$(call BuildPackage
,libopenssl
))
112 $(eval
$(call BuildPackage
,openssl-util
))