diff options
author | Slavi Pantaleev | 2015-07-29 02:40:46 +0300 |
---|---|---|
committer | Slavi Pantaleev | 2015-07-29 02:40:46 +0300 |
commit | e5f9d7f9ac789b3dd2fd2c9dfb960c53a5df6471 (patch) | |
tree | ff2401a1cdcc42b9e6c0d458cbeadd03c95781e8 | |
download | aur-e5f9d7f9ac789b3dd2fd2c9dfb960c53a5df6471.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | sftpman.install | 32 |
4 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f66569b6b60e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = sftpman + pkgdesc = Application that handles sshfs/sftp file systems mounting. + pkgver = 0.6.1 + pkgrel = 1 + epoch = 1 + url = https://github.com/spantaleev/sftpman + install = sftpman.install + arch = any + license = BSD + makedepends = git + depends = python + depends = sshfs + depends = python-setuptools + optdepends = sftpman-gtk: GTK frontend + source = vcs-repository::git://github.com/spantaleev/sftpman.git#tag=0.6.1 + md5sums = SKIP + +pkgname = sftpman + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ce3fa708fb1a --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.xz +*.gz +pkg +src +vcs-repository diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4e3ae2d3d52f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Slavi Pantaleev <s.pantaleev at gmail.com> + +pkgname=sftpman +epoch=1 +pkgver=0.6.1 +pkgrel=1 +pkgdesc="Application that handles sshfs/sftp file systems mounting." +arch=('any') +url="https://github.com/spantaleev/sftpman" +license=('BSD') +depends=('python' 'sshfs' 'python-setuptools') +makedepends=('git') +optdepends=('sftpman-gtk: GTK frontend') +install=$pkgname.install +source=('vcs-repository::git://github.com/spantaleev/sftpman.git#tag='$pkgver) +md5sums=('SKIP') + +package() { + cd "$srcdir/vcs-repository" + python setup.py install --prefix=/usr --root=$pkgdir/ --optimize=1 + + install -Dm 644 $srcdir/vcs-repository/LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE + install -Dm 755 $srcdir/vcs-repository/sleep-scripts/sleep.d/49-sftpman-unmount-all $pkgdir/etc/pm/sleep.d/49-sftpman-unmount-all + install -Dm 755 $srcdir/vcs-repository/sleep-scripts/system-sleep/sftpman-unmount-all.sh $pkgdir/usr/lib/systemd/system-sleep/sftpman-unmount-all.sh + install -Dm 644 $srcdir/vcs-repository/bash_completion.d/sftpman $pkgdir/etc/bash_completion.d/sftpman +} diff --git a/sftpman.install b/sftpman.install new file mode 100644 index 000000000000..6b28872e6217 --- /dev/null +++ b/sftpman.install @@ -0,0 +1,32 @@ +_ensure_mount_path() { + mkdir -p -m 775 /mnt/sshfs + chown :users /mnt/sshfs +} + +post_install() { + _ensure_mount_path + + # Let's see if everything is OK now.. + # This may not be very accurate, because it runs as root, + # but it may still catch some potential problems. + output=$(sftpman preflight_check 2>&1) + if [ ! "$?" = "0" ]; then + echo -e "sftpman preflight_check results:\n" + echo "$output" + fi +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + echo "Unmounting any sftpman-mounted filesystems.." + # The sleep.d script knows how to unmount sftpman filesystems for all users. + # It's usually used during suspend/hibernate. + /etc/pm/sleep.d/49-sftpman suspend +} + +post_remove() { + rmdir --ignore-fail-on-non-empty /mnt/sshfs +} |