Created
April 5, 2009 08:05
-
-
Save c9s/90402 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# subversion install script | |
# please run this script as root | |
# last update: 08 Dec 24 12/24/2008 | |
install_swig=1 | |
install_subversion_svn=1 | |
svn_version=1.5.3 | |
swig_version=1.3.38 | |
neon_version=0.28.3 | |
source_dir=~/app_src | |
svn_file=subversion-$svn_version | |
neon_file=neon-$neon_version | |
swig_file=swig-$swig_version | |
dav_svn=/etc/apache2/mods-available/dav_svn.load | |
httpd_conf=/etc/apache2/httpd.conf | |
mkdir -p $source_dir | |
cd $source_dir | |
# install swig library | |
if [[ $install_swig == 1 ]] ; then | |
echo "[[ $swig_file ]]" | |
echo downloading | |
wget -nv -c http://nchc.dl.sourceforge.net/sourceforge/swig/$swig_file.tar.gz | |
echo 'unpacking...' | |
if [ ! -e $swig_file ] ; then | |
echo $swig_file exists. | |
tar xf $swig_file.tar.gz | |
fi | |
cd $swig_file | |
echo 'configuring...' | |
./configure 1>& /dev/null | |
echo 'building...' | |
make 1>& /dev/null | |
echo 'installing...' | |
make install 1>& /dev/null | |
cd $source_dir | |
fi | |
# check apache installed | |
if [[ -z `which apxs` ]] ; then | |
sudo port install apache2 | |
fi | |
if [[ $install_subversion_svn == 1 ]] ; then | |
echo 'using subversion from repository...' | |
sudo port install openssl -f | |
if [ -e "subversion.svn" ] ; then | |
echo 'found subversion.svn directory...' | |
cd subversion.svn | |
echo 'updating...' | |
svn up | |
else | |
echo 'checking out...' | |
svn co http://svn.collab.net/repos/svn/trunk subversion.svn | |
svn up | |
cd subversion.svn | |
fi | |
else | |
# get subversion tarball | |
echo "[[ $svn_file ]]" | |
echo 'downloading...' | |
wget -nv -c http://subversion.tigris.org/downloads/$svn_file.tar.bz2 | |
echo 'unpacking...' | |
tar xf $svn_file.tar.bz2 | |
cd $svn_file | |
fi | |
# get libneon and put it into subversion directory | |
echo "[[ $neon_file ]]" | |
echo 'downloading...' | |
wget -nv -c http://www.webdav.org/neon/$neon_file.tar.gz | |
echo 'unpacking...' | |
tar xf $neon_file.tar.gz | |
cp -r $neon_file neon | |
cd neon | |
make clean | |
cd .. | |
# clean up | |
make clean | |
# build it | |
echo 'configuring...' | |
# ./configure --enable-shared --prefix=/usr --with-swig=/usr/share/swig/$swig_version/ | |
./autogen.sh | |
./configure --enable-shared \ | |
--with-ssl \ | |
--with-libs=/opt/local/include/openssl \ | |
--with-apxs=`which apxs` \ | |
--with-neon | |
# make dummy module loading for apxs | |
# awk '/dav_svn|authz_svn/ {print "#" $0}' $dav_svn >> $httpd_conf | |
if [[ -z `grep '^#.*dav_svn_module' $httpd_conf` ]] ; then | |
echo 'inserting dav_svn_module dummy' | |
cat <<EOF >> $httpd_conf | |
# LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so | |
# LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so | |
EOF | |
fi | |
echo 'building and installing...' | |
make 1> /dev/null && sudo make install 1> /dev/null # this will install dav_svn apache module | |
echo 'compiling swig-perl...' | |
make swig-pl 1> /dev/null | |
echo 'testing...' | |
make check-swig-pl | |
# install swig pl binding | |
echo 'Installing swig-pl' | |
make install-swig-pl | |
echo 'Making swig-pl-lib' | |
make swig-pl-lib | |
make install-swig-pl-lib | |
# install SVN::Core CPAN Module | |
PWD=`pwd` | |
cd subversion/bindings/swig/perl/native | |
echo 'configuring Swig Bingin module...EXTRAOPTIONSHERE' | |
perl Makefile.PL EXTRAOPTIONSHERE | |
echo 'Building...' | |
make 1> /dev/null | |
echo 'Installing Swig Binding Module...' | |
make install 1> /dev/null | |
cd $PWD | |
echo 'Done' | |
# install SVK | |
# cpanp -i SVK --skiptest | |
# cpan deps | |
# gpm | |
# curl | |
# lynx | |
# ncftp | |
# ncftpget | |
# makepatch | |
# zip unzip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment