diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-01 19:59:17 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-01 20:09:48 +0200 |
commit | a0fe50dcd2f703e247fa5c57b6b3c7820c1cf183 (patch) | |
tree | 9c761b57880f8b06c70678627894663c1c833d7f /main/py-crypto | |
parent | 74391368e6b4dc6b6b351ba4e88b6369e287b5f4 (diff) | |
download | aports-a0fe50dcd2f703e247fa5c57b6b3c7820c1cf183.tar.bz2 aports-a0fe50dcd2f703e247fa5c57b6b3c7820c1cf183.tar.xz |
main/py-crypto: improve abuild and fix to not silently fail
Diffstat (limited to 'main/py-crypto')
-rw-r--r-- | main/py-crypto/APKBUILD | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/main/py-crypto/APKBUILD b/main/py-crypto/APKBUILD index 2d4eed7329..ac0e09fde6 100644 --- a/main/py-crypto/APKBUILD +++ b/main/py-crypto/APKBUILD @@ -9,47 +9,44 @@ url="https://www.dlitz.net/software/pycrypto/" arch="noarch" license="BSD" depends="" -makedepends="gmp-dev python-dev python3-dev" -subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" -source="http://ftp.dlitz.net/pub/dlitz/crypto/$_pkgname/$_pkgname-$pkgver.tar.gz" +makedepends="gmp-dev python2-dev python3-dev" +subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" -_builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python setup.py build || return 1 - python setup.py test || return 1 + cd "$builddir" + + python2 setup.py build || return 1 + python2 setup.py test || return 1 python3 setup.py build || return 1 python3 setup.py test || return 1 } package() { - cd "$_builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 - python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 + mkdir -p "$pkgdir" } _py() { - local python=$1 - pkgdesc="$pkgdesc - $python" + local python="$1" + pkgdesc="$pkgdesc (for $python)" arch="all" install_if="$pkgname=$pkgver-r$pkgrel $python" - local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') - mkdir -p "$subpkgdir"${dir} - mv "$pkgdir"${dir}/* "$subpkgdir"${dir} + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" --optimize=1 } _py2() { - _py python2 replaces="$pkgname" + _py python2 } _py3() { _py python3 } - md5sums="55a61a054aa66812daf5161a0d5d7eda pycrypto-2.6.1.tar.gz" sha256sums="f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c pycrypto-2.6.1.tar.gz" sha512sums="20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847 pycrypto-2.6.1.tar.gz" |