blob: ea61c087652c6faeaf13cc54a217e2134c070c39 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-crypto
_pkgname=pycrypto
pkgver=2.6.1
pkgrel=1
pkgdesc="A Python collection of cryptographic algorithms and protocols"
url="https://www.dlitz.net/software/pycrypto/"
arch="all"
license="BSD"
depends=""
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"
build() {
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() {
mkdir -p "$pkgdir"
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir" --optimize=1
}
_py2() {
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"
|