updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / client175-svn / PKGBUILD
blob16850a83f8ad42dcfa292be19085368686bec7bf
1 # Maintainer: Alexander De Sousa <archaur.xandy21@spamgourmet.com>
3 pkgname=client175-svn
4 pkgver=130
5 pkgrel=1
6 pkgdesc="Full featured MPD web client, svn code."
7 arch=('any')
8 url="http://code.google.com/p/client175/"
9 license=('GPL3')
10 depends=('mpd>=0.14' 'python2' 'python-beautifulsoup' 'mutagen'
11          'python2-cherrypy')
12 makedepends=('subversion')
13 provides=('client175')
14 conflicts=('client175')
15 backup=('opt/client175/site.conf')
16 install=client175-svn.install
18 _svntrunk=http://client175.googlecode.com/svn/trunk/
19 _svnmod=client175
21 build() {
22         cd "$srcdir"
24         if [ -d $_svnmod/.svn ]; then
25                 msg2 "Updating downloaded sources..."
26                 (cd $_svnmod && svn up --quiet -r $pkgver)
27         else
28                 msg2 "Downloading sources from the repository..."
29                 svn co --quiet $_svntrunk --config-dir ./ -r $pkgver $_svnmod
30         fi
32         msg2 "SVN checkout done or server timeout."
34         # Work in a different directory:
35         rm -rf "$srcdir/$_svnmod-build"
36         cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
37         cd "$srcdir/$_svnmod-build"
39         # Use the Python 2.x interpreter instead of Python 3.x:
40         sed 's|/usr/bin/env python|/usr/bin/env python2|g' -i server.py
41         sed 's|/usr/bin/env python|/usr/bin/env python2|g' -i covers.py
42         sed 's|/usr/bin/env python|/usr/bin/env python2|g' -i mpd_proxy2.py
44         # Use system Beautiful Soup, mutagen and cherrypy:
45         rm -f BeautifulSoup.py
46         rm -fr mutagen
47         rm -fr cherrypy
49         # Set the executable bit to allow direct execution:
50         chmod +x server.py
52         msg2 "Removing .svn directories from build directory..."
53         rm -fr `find . -type d -name .svn`
56 package() {
57         msg2 "Installing files..."
58         install -dm755 "$pkgdir/opt/client175"  
59         cp -rT "$srcdir/client175-build" "$pkgdir/opt/client175"
61         # Allow any user to write in the covers directory:
62         chmod 777 "$pkgdir/opt/client175/static/covers"
65 # vim: set ft=sh ts=3 sw=3 tw=0: