Subversionを$HOME以下にビルドする(またはmod_dav_svnをビルドしない)

管理権限を持っていないサーバでsvnを使いたいなー、とか考えていたのですが、どうもsvnが入っていないご様子。なのでsvnを$HOME以下にビルドしようと考えました。

subversion-1.5.2.tar.gzとsubversion-deps-1.5.2.tar.gzの取得

wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.5.2.tar.gz
tar xvf *.tar.gz

Subversionと、依存パッケージ詰め合わせを持ってきて展開する。subveresion-1.5.2といディレクトリができる。

configure

./configure --prefi=$HOME/local --without-apxs --without-apache

オプションを見ると、--disable-mod-activationとかいうそれっぽいオプションがありますが、これはhttpd.confにmod_dav_svnを書かないというだけで、mod_dav_svn自体インストールしようとします。書き込み権限を持っていなければ当然Parmissionうんたらとかいうエラーが出てインストールが止まります。
configure中にmod_dav_svnコンパイルするには --with-apsx か --with-apacheが必要だよー、とかいうWARNINGが出ます。どちらかでいいのかなー、と思ってひとつしか指定しなかったら見事にmod_dav_svnをインストールしようとしやがったので両方指定します。

make && make install

make && make install

注意

svn: 'http://svn.hogehoge.com/fugafuga' 用の URL スキームを認識できません

subversion-deps-1.5.2.tar.gzを展開し忘れるとこのようなエラーが出たりします。svnでhttp(s)のレポジトリにアクセスするにはNeonとかSerfとかいうライブラリが必要なようです。subversion-deps-1.5.2.tar.gzにどちらも含まれているので、ちゃんと入れておきましょう。
INSTALLにはこう書いてあります。

* libneon or libserf (OPTIONAL for client)

The Neon and Serf libraries both allow the Subversion client
to send HTTP requests. This is necessary if you want your
client to access a repository served by the Apache HTTP
server. There is an alternate 'svnserve' server as well,
though, and clients automatically know how to speak the
svnserve protocol. Thus it's not strictly necessary for your
client to be able to speak HTTP... though we still recommend
that your client be built to speak both HTTP and svnserve
protocols. Your client can be compiled against either
libneon or libserf (or both), as they offer competing
implementations.