summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb2ba1a19b7a0059cd720a6bb9c21d828109cdfd (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
28
29
30
31
32
# Maintainer: SelfRef <arch@selfref.dev>

_basename=exscript
pkgname="python-${_basename}-git"
pkgver=2.6.30
pkgrel=1
pkgdesc="A Python module making Telnet and SSH easy"
arch=('any')
url="https://github.com/knipknap/exscript"
license=('MIT')
conflicts=("python-${_basename}")
provides=("python-${_basename}")
depends=('python' 'python-future' 'python-configparser' 'python-pycryptodomex' 'python-paramiko>=1.17')
makedepends=('git')
source=("${_basename}"::"git+https://github.com/knipknap/exscript.git")
md5sums=('SKIP')

pkgver() {
	cd ${_basename}
	git describe $HEAD --tags --match "v[0-9]*" | sed 's/^v//;s/-[^\-]*$//;s/-/./'
}

build() {
	cd ${_basename}
	sed -i "s/DEVELOPMENT/$pkgver/" ./Exscript/version.py
	python setup.py build
}

package() {
	cd ${_basename}
	python setup.py install --root="$pkgdir" --optimize=1
}