Merge pull request #279 from michalbednarski/python-setinheritable
[termux-packages] / packages / openssl / build.sh
1 TERMUX_PKG_HOMEPAGE=https://www.openssl.org/
2 TERMUX_PKG_DESCRIPTION="Library implementing the SSL and TLS protocols as well as general purpose cryptography functions"
3 TERMUX_PKG_DEPENDS="ca-certificates"
4 TERMUX_PKG_VERSION=1.0.2h
5 TERMUX_PKG_BUILD_REVISION=1
6 TERMUX_PKG_SRCURL="http://www.openssl.org/source/openssl-${TERMUX_PKG_VERSION}.tar.gz"
7 TERMUX_PKG_RM_AFTER_INSTALL="bin/c_rehash etc/ssl/misc"
8 TERMUX_PKG_BUILD_IN_SRC=yes
9
10 # Information about compilation and installation of openssl:
11 # http://wiki.openssl.org/index.php/Compilation_and_Installation
12
13 termux_step_configure () {
14 perl -p -i -e "s@TERMUX_CFLAGS@$CFLAGS@g" Configure
15 rm -Rf $TERMUX_PREFIX/lib/libcrypto.* $TERMUX_PREFIX/lib/libssl.*
16 TERMUX_OPENSSL_PLATFORM_SUFFIX=""
17 test $TERMUX_ARCH = "arm" && TERMUX_OPENSSL_PLATFORM_SUFFIX="-armv7"
18 test $TERMUX_ARCH = "i686" && TERMUX_OPENSSL_PLATFORM_SUFFIX="-x86"
19 # If enabling zlib-dynamic we need "zlib-dynamic" instead of "no-comp no-dso":
20 ./Configure android$TERMUX_OPENSSL_PLATFORM_SUFFIX --prefix=$TERMUX_PREFIX \
21 --openssldir=$TERMUX_PREFIX/etc/tls \
22 shared \
23 no-comp no-dso \
24 no-ssl2 no-hw no-engines no-psk no-srp
25 }
26
27 termux_step_make () {
28 make depend
29 make -j 1 all
30 }
31
32 termux_step_make_install () {
33 # "install_sw" instead of "install" to not install man pages
34 make -j 1 install_sw MANDIR=$TERMUX_PREFIX/share/man MANSUFFIX=.ssl
35 }