updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / ajenti / PKGBUILD
blob994fc3a0190d6744f8ab8694c29e381bdb000b59
1 # Maintainer: Shanto <shanto@hotmail.com>
2 # Contributor: vbPadre <vbpadre@gmail.com>
4 pkgname=ajenti
5 pkgver=0.6.1
6 pkgrel=2
7 pkgdesc="An easy server administration frontend (like Webmin)."
8 arch=('any')
9 url="http://ajenti.org/"
10 license=('LGPL')
11 depends=('python2' 'python-lxml' 'python2-pyopenssl' 'python2-feedparser' 'python2-gevent')
12 makedepends=('git' 'python2' 'python2-distribute')
13 optdepends=(
14         'python2-psutil: Task Manager plugin'
15         'python-beautifulsoup: Munin plugin'
17 provides=('ajenti')
18 install='ajenti.install'
19 source=('https://raw.github.com/Eugeny/ajenti/142d43219ab11d305d9b04f3c1daf256ca090248/packaging/files/ajenti.arch')
20 md5sums=('007a9297dc1c7dc75d04b3b76b7962b5')
22 gitroot=git://github.com/Eugeny/ajenti.git
23 gitbranch=dev
24 gitname=ajenti
26 build() {
27         cd "$srcdir"
28         msg "Connecting to GIT server...."
30         if [[ -d "$gitname" ]]; then
31                 cd "$gitname" && git fetch
32                 msg "The local files are updated."
33         else
34                 git clone "$gitroot" "$gitname"
35         fi
37         msg "GIT checkout done or server timeout"
38         msg "Starting build..."
40         rm -rf "$srcdir/$gitname-build"
41         git clone "$srcdir/$gitname" "$srcdir/$gitname-build"
42         cd "$srcdir/$gitname-build"
43         git checkout "$pkgver"
46 package() {
47         cd "$srcdir/$gitname-build"
48         find . -name '*.py' -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/python2|' "{}" \;
49         python2 setup.py install --root "$pkgdir"
50         mv "$pkgdir/etc/init.d" "$pkgdir/etc/rc.d"
51         install "$srcdir/ajenti.arch" "$pkgdir/etc/rc.d/ajenti"
52         rm -rf "$srcdir/$gitname-build"