diff options
author | Erich Eckner <git@eckner.net> | 2019-05-24 14:44:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-24 14:44:57 +0200 |
commit | 51cc2769b2181857a46a303f68497534807e5331 (patch) | |
tree | 06504c329fd768ef488e810b8b7eab7204aca165 | |
parent | ab2b16e1e4587efca275158ccc5a1bbc72f277fe (diff) | |
download | python-postpic-51cc2769b2181857a46a303f68497534807e5331.tar.xz |
PKGBUILD: change variable names
-rw-r--r-- | PKGBUILD | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -2,6 +2,7 @@ pkgbase=python-postpic pkgname=(python-postpic python2-postpic) +_pkgname="${pkgbase#*-}" pkgver=0.4 pkgrel=2 pkgdesc='The open source particle-in-cell post processor.' @@ -36,31 +37,31 @@ makedepends=( "${_makedepends[@]}" "${_makedepends[@]/ython/ython2}" ) -source=($pkgname-$pkgver.tar.gz::https://github.com/skuschel/postpic/archive/v$pkgver.tar.gz) +source=("$pkgname-$pkgver.tar.gz::https://github.com/skuschel/${_pkgname}/archive/v$pkgver.tar.gz") sha512sums=('c1a2ce68e7df5c4f16b01f46d2e171ac48c3eeddc7b2c219c6b070df5e4e4521b81ff9b7b45b514ff78b4866a1bfa44ad83ce357865c59d3b4f86e274d81fe69') prepare() { - cp -a postpic-${pkgver}{,-py2} + cp -a ${_pkgname}-${pkgver}{,-py2} } build() { echo "Building python..." - (cd postpic-${pkgver} + (cd ${_pkgname}-${pkgver} python setup.py build ) echo "Building python2..." - (cd postpic-${pkgver}-py2 + (cd ${_pkgname}-${pkgver}-py2 python2 setup.py build ) } check() { echo "Checking python..." - (cd postpic-${pkgver} + (cd ${_pkgname}-${pkgver} python setup.py test ) echo "Checking python2..." - (cd postpic-${pkgver}-py2 + (cd ${_pkgname}-${pkgver}-py2 python2 setup.py test ) } @@ -72,7 +73,7 @@ package_python-postpic() { ) optdepends=("${_optdepends[@]}") - cd postpic-${pkgver} + cd ${_pkgname}-${pkgver} python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname} #install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname} @@ -85,7 +86,7 @@ package_python2-postpic() { ) optdepends=("${_optdepends[@]/python/python2}") - cd postpic-${pkgver}-py2 + cd ${_pkgname}-${pkgver}-py2 python2 setup.py install --prefix=/usr --root="${pkgdir}" --skip-build install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname} #install -Dm 644 CHANGES README -t "${pkgdir}"/usr/share/doc/${pkgname} |