stunnel4/build-android.sh

32 lines
809 B
Bash
Raw Normal View History

2017-03-28 09:58:13 +02:00
#!/bin/sh
set -ev
2017-03-28 10:18:03 +02:00
VERSION=4.57
2017-03-28 09:58:13 +02:00
DST=stunnel-$VERSION-android
# to build Zlib:
# export CHOST=arm-linux-androideabi
# ./configure --static --prefix=/opt/androideabi/sysroot
# make
# make install
# to build OpenSSL:
# export CC=arm-linux-androideabi-gcc
# ./Configure linux-armv4 threads no-shared zlib no-dso --openssldir=/opt/androideabi/sysroot
# make
# make install
2017-03-28 10:18:03 +02:00
mkdir -p bin/android
cd bin/android
../../configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix=/data/local --with-ssl=/opt/androideabi/sysroot
2017-03-28 09:58:13 +02:00
make clean
make
2017-03-28 10:18:03 +02:00
cd ../..
2017-03-28 09:58:13 +02:00
mkdir $DST
2017-03-28 10:18:03 +02:00
cp bin/android/src/stunnel /opt/androideabi/sysroot/bin/openssl $DST
2017-03-28 09:58:13 +02:00
# arm-linux-androideabi-strip $DST/stunnel $DST/openssl
arm-linux-androideabi-strip $DST/openssl
zip -r $DST.zip $DST
rm -rf $DST
sha256sum $DST.zip
mv $DST.zip ../dist/