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
82 DESCRIPTION
:=Open source SSL
(Secure Socket Layer
) libraries
83 URL
:=http
://www.openssl.org
/
86 define Package
/openssl-util
87 $(call Package
/libopenssl
)
89 TITLE
:=OpenSSL command line utilities
90 DESCRIPTION
:=OpenSSL command line utilities
94 define Package
/libopenssl
/install
95 install -d
-m0755
$(1)/usr
/lib
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{crypto
,ssl
}.so.
* $(1)/usr
/lib
/
97 chmod
0644 $(1)/usr
/lib
/*
100 define Package
/openssl-util
/install
101 install -d
-m0755
$(1)/etc
/ssl
102 $(CP
) $(PKG_INSTALL_DIR
)/etc
/ssl
/openssl.cnf
$(1)/etc
/ssl
/
103 install -d
-m0755
$(1)/etc
/ssl
/certs
104 install -d
-m0755
$(1)/etc
/ssl
/private
105 chmod
0700 $(1)/etc
/ssl
/private
106 install -d
-m0755
$(1)/usr
/bin
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/openssl
$(1)/usr
/bin
/
111 $(eval
$(call BuildPackage
,libopenssl
))
112 $(eval
$(call BuildPackage
,openssl-util
))