summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 108fc0f31026a19ac2bed7ea612271195e8caf4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Maintainer: Simon Zack <simonzack@gmail.com>
pkgname=zsh-autoswitch-virtualenv-git
pkgver=3.3.2.r0.gecc53e3
pkgrel=1
pkgdesc='ZSH plugin that switches python virtualenvs automatically as you move between directories.'
arch=('any')
url="https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv"
license=('GPL3')
depends=('zsh' 'python' 'pwgen')
makedepends=('git')
optdepends=(
  'python-pipenv: Pipenv integration'
  'python-poetry: Poetry integration'
)
source=('zsh-autoswitch-virtualenv::git+https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/zsh-autoswitch-virtualenv"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd "$srcdir"
  install -Dm644 "${pkgname%-git}/autoswitch_virtualenv.plugin.zsh" \
    "$pkgdir/usr/share/zsh/plugins/${pkgname%-git}/${pkgname%-git}.plugin.zsh"
}