Last active
September 27, 2020 16:27
-
-
Save andrejpavlovic/5351eec2e94fa560765a0609b8c65d44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for more info @see http://www.pokret.org/2017/02/how-to-build-and-install-subversion-on-shared-hosting/ | |
set -e # exit on error | |
set -x # echo on | |
MYPREFIX=$HOME/apps # Target build directory | |
MYSRC=$HOME/src # Target directory for storing source files | |
# Ensure directories are created | |
mkdir -p $MYPREFIX $MYSRC | |
# Download and build OpenSSL | |
cd $MYSRC | |
wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz | |
tar xzvf openssl-1.0.2k.tar.gz | |
cd openssl-1.0.2k | |
./config shared --prefix=$MYPREFIX | |
make && make install | |
# Download Subversion | |
cd $MYSRC | |
wget http://apache.mirror.vexxhost.com/subversion/subversion-1.9.5.tar.gz | |
tar xzvf subversion-1.9.5.tar.gz | |
cd subversion-1.9.5 | |
./get-deps.sh # Download Subversion dependencies | |
# Build APR | |
cd apr | |
./configure --enable-shared --prefix=$MYPREFIX | |
make && make install | |
cd .. | |
# Build APR Util | |
cd apr-util | |
./configure --enable-shared --prefix=$MYPREFIX --with-expat=builtin --with-apr=$MYPREFIX --without-berkeley-db | |
make && make install | |
cd .. | |
# Build Serf | |
cd serf | |
wget http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz | |
tar xzvf scons-local-2.3.0.tar.gz | |
# Use scons build tool to build Serf | |
python scons.py PREFIX=$MYPREFIX APR=$MYPREFIX/bin/apr-1-config APU=$MYPREFIX/bin/apu-1-config OPENSSL=$MYPREFIX | |
python scons.py install | |
cd .. | |
# Build subversion | |
./configure --prefix=$MYPREFIX --without-berkeley-db --with-editor=/usr/bin/vi --with-apr=$MYPREFIX --with-apr-util=$MYPREFIX --with-serf=$MYPREFIX --without-apxs --without-apache | |
make && make install | |
# Test subversion executable to make sure it's working | |
cd $MYPREFIX/bin | |
./svn --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment