buildfiles/tor/oldscripts/build-tor-arm.sh

51 lines
1.5 KiB
Bash
Raw Permalink Normal View History

2018-10-25 22:43:04 +00:00
#!/bin/sh
BUILD_DIR=${PWD}/build-tor-arm
2018-10-25 22:43:04 +00:00
ZLIB_VERSION=1.2.11
LIBEVENT_VERSION=2.1.8-stable
OPENSSL_VERSION=1.0.2p
TOR_VERSION=0.3.5.3-alpha
2018-10-25 22:43:04 +00:00
2018-10-27 19:43:41 +00:00
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}
2018-10-25 22:43:04 +00:00
2018-10-27 19:43:41 +00:00
curl -fsSL "https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" | tar zxvf -
cd zlib-${ZLIB_VERSION}
./configure --prefix=$PWD/install
make -j$(nproc)
make install
cd ..
2018-10-25 22:43:04 +00:00
2018-10-27 19:43:41 +00:00
curl -fsSL "https://github.com/libevent/libevent/releases/download/release-${LIBEVENT_VERSION}/libevent-${LIBEVENT_VERSION}.tar.gz" | tar zxvf -
cd libevent-${LIBEVENT_VERSION}
./configure --prefix=$PWD/install \
2018-10-25 22:43:04 +00:00
--disable-shared \
--enable-static \
--with-pic \
2018-10-27 19:43:41 +00:00
--host=arm-linux-gnueabihf
make -j$(nproc)
make install
2018-10-27 19:43:41 +00:00
cd ..
2018-10-25 22:43:04 +00:00
2018-10-27 19:43:41 +00:00
curl -fsSL "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" | tar zxvf -
cd openssl-${OPENSSL_VERSION}
./Configure --openssldir=$PWD/install no-shared no-dso linux-armv4
2018-10-27 19:43:41 +00:00
make -j$(nproc) INSTALL_PREFIX=$PWD/install
make install
2018-10-27 19:43:41 +00:00
cd ..
2018-10-25 22:43:04 +00:00
curl -fsSL "https://www.torproject.org/dist/tor-${TOR_VERSION}.tar.gz" | tar zxvf -
cd tor-${TOR_VERSION}
2018-10-27 19:43:41 +00:00
./configure --prefix=$PWD/install \
2018-10-25 22:43:04 +00:00
--enable-static-tor \
--with-libevent-dir=$PWD/../libevent-${LIBEVENT_VERSION}/install \
--with-openssl-dir=$PWD/../openssl-${OPENSSL_VERSION}/install \
--with-zlib-dir=$PWD/../zlib-${ZLIB_VERSION}/install \
--host=armv7-unknown-linux-gnueabi \
--disable-tool-name-check
make -j$(nproc)
2018-10-27 19:43:41 +00:00
make install
2018-10-25 22:43:04 +00:00
echo ""
echo "Results in ${BUILD_DIR}/tor-${TOR_VERSION}/install/bin"