diff options
author | Jonas Witschel | 2020-03-10 16:29:01 +0100 |
---|---|---|
committer | Jonas Witschel | 2020-03-10 16:29:01 +0100 |
commit | f5a4da05afa087efd26ac2740c98e1bc85f6c46d (patch) | |
tree | 0c07693c5cb189d4a36406479b80ed54929f0ecb /PKGBUILD | |
download | aur-f5a4da05afa087efd26ac2740c98e1bc85f6c46d.tar.gz |
Rename tpm2-pytss-git to python-tpm2-pytss-git
Accoring to the Python package guidelines modules should have a
"python-" prefix.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fa067ddce355 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Jonas Witschel <diabonas@archlinux.org> +pkgname=python-tpm2-pytss-git +_name=${pkgname#python-} +pkgver=0.0.4.r0.21bac4c +pkgrel=1 +pkgdesc='Python bindings for tpm2-tss' +arch=('x86_64') +url='https://github.com/tpm2-software/tpm2-pytss' +license=('BSD') +depends=('python-setuptools' 'tpm2-tss') +makedepends=('git' 'swig') +checkdepends=('ibm-sw-tpm2') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +replaces=('tpm2-pytss-git') +source=("git+$url.git" 'git+https://github.com/tpm2-software/tpm2-swig.git') +sha512sums=('SKIP' 'SKIP') + +pkgver() { + cd "${_name%-git}" + git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' +} + +prepare() { + cd "${_name%-git}" + git submodule init + git config submodule.tpm2_pytss/swig.url "$srcdir/tpm2-swig" + git submodule update +} + +build() { + cd "${_name%-git}" + python setup.py build +} + +check() { + cd "${_name%-git}" + python setup.py test +} + +package() { + cd "${_name%-git}" + python setup.py install --root="$pkgdir" --optimize=1 + rm -r "$pkgdir"/usr/lib/python*/site-packages/tests + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" +} |