updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sftpman / PKGBUILD
blob9ee7382334d20157f23d923458597838d63edd58
1 # Maintainer: Slavi Pantaleev <s.pantaleev at gmail.com>
3 pkgname=sftpman
4 epoch=1
5 pkgver=0.5.2
6 pkgrel=1
7 pkgdesc="Application that handles sshfs/sftp file systems mounting."
8 arch=('any')
9 url="https://github.com/spantaleev/sftpman"
10 license=('BSD')
11 depends=('python' 'sshfs' 'python-distribute')
12 makedepends=('git')
13 optdepends=('sftpman-gtk: GTK frontend')
14 install=$pkgname.install
16 git_location="git://github.com/spantaleev/sftpman.git"
17 git_branch=$pkgver
19 build() {
20         cd "$srcdir"
21         msg "Connecting to GIT server...."
23         if [ -d $pkgname ] ; then
24                 cd $pkgname
25                 # Switch back to master as we're now on a tagged branch
26                 git checkout master
27                 git pull origin
28                 msg "The local files are updated."
29                 git checkout $git_branch
30         else
31                 git clone $git_location $pkgname
32                 cd $pkgname
33                 git checkout $git_branch
34         fi
36         msg "GIT checkout done"
39 package() {
40         cd "$srcdir/$pkgname"
41         python setup.py install --root=$pkgdir/ --optimize=1
43         install -Dm 644 $srcdir/$pkgname/LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
44         install -Dm 755 $srcdir/$pkgname/sleep.d/49-$pkgname $pkgdir/etc/pm/sleep.d/49-$pkgname
45         install -Dm 644 $srcdir/$pkgname/bash_completion.d/$pkgname $pkgdir/etc/bash_completion.d/$pkgname