updated on Fri Jan 20 04:00:45 UTC 2012
[aur-mirror.git] / rutorrent-svn / PKGBUILD
blob49a9b09b00ae851dae7a7706340b636e0602160d
1 # Maintainer: skydrome <irc.freenode.net>
2 # Contributor: smallcms <smallcms at mail dot ru>
4 pkgname=rutorrent-svn
5 pkgver=1941
6 pkgrel=1
7 pkgdesc="Yet another web front-end for rTorrent"
8 arch=('any')
9 url="http://code.google.com/p/rutorrent"
10 license=('GPL')
11 depends=('rtorrent' 'php>=5.3.0')
12 makedepends=('subversion')
13 optdepends=()
14 provides=('rutorrent')
15 conflicts=('rutorrent')
16 backup=()
17 options=(!strip emptydirs)
18 install=
19 source=()
20 md5sums=()
22 _svntrunk="http://rutorrent.googlecode.com/svn/trunk/"
23 _svnmod="rutorrent"
25 build() {
26 cd "$srcdir"
27 msg "Connecting to SVN server...."
29     if [[ -d "$_svnmod/.svn" ]]; then
30         svn up -r "$pkgver" "$_svnmod"
31     else
32         svn co ${_svntrunk}/${_svnmod} --config-dir ./ -r "$pkgver" "$_svnmod"
33         # This is the secure way of dealing with rtorrent communication! Use it!
34         svn co ${_svntrunk}/plugins/httprpc ${_svnmod}/plugins/httprpc
35     fi
37 msg "SVN checkout done or server timeout"
38 msg "Starting build..."
40     rm -r ${_svnmod}/plugins/.svn
41     sed -i ${_svnmod}/conf/config.php \
42                 -e "s:\$topDirectory .*:\$topDirectory = '/home';:" \
43                 -e "s:\$XMLRPCMountPoint .*:\$XMLRPCMountPoint = \"/rutorrent/RPC1\";:"
44     mkdir -p ${pkgdir}/srv/http
45     cp -r "$_svnmod" ${pkgdir}/srv/http
46     chmod -R 755 ${pkgdir}/srv/http/${_svnmod}