Initial push
[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_ESSENTIAL=yes
4 TERMUX_PKG_VERSION=1.0.2a
5 TERMUX_PKG_SRCURL="http://www.openssl.org/source/openssl-${TERMUX_PKG_VERSION}.tar.gz"
6 TERMUX_PKG_RM_AFTER_INSTALL="bin/c_rehash etc/ssl/misc"
7 TERMUX_PKG_BUILD_IN_SRC=yes
8
9 # Information about compilation and installation of openssl:
10 # http://wiki.openssl.org/index.php/Compilation_and_Installation
11
12 termux_step_configure () {
13 perl -p -i -e "s@TERMUX_CFLAGS@$CFLAGS@g" Configure
14 rm -Rf $TERMUX_PREFIX/lib/libcrypto.* $TERMUX_PREFIX/lib/libssl.*
15 test $TERMUX_ARCH = "arm" && TERMUX_OPENSSL_PLATFORM_SUFFIX=armv7
16 test $TERMUX_ARCH = "i686" && TERMUX_OPENSSL_PLATFORM_SUFFIX=x86
17 # If enabling zlib-dynamic we need "zlib-dynamic" instead of "no-comp no-dso":
18 ./Configure android-$TERMUX_OPENSSL_PLATFORM_SUFFIX --prefix=$TERMUX_PREFIX \
19 --openssldir=$TERMUX_PREFIX/etc/ssl \
20 shared \
21 no-comp no-dso \
22 no-ssl2 no-hw no-engines no-psk no-srp
23 }
24
25 termux_step_make () {
26 make depend
27 make -j 1 all
28 }
29
30 termux_step_make_install () {
31 # "install_sw" instead of "install" to not install man pages
32 make -j 1 install_sw MANDIR=$TERMUX_PREFIX/share/man MANSUFFIX=.ssl
33 }