summaryrefslogtreecommitdiff
path: root/extra/pyopenssl/PKGBUILD
blob: 5d6383bdf6b9acfb82aebcafd20ae8c042fb1e66 (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
# $Id: PKGBUILD 110679 2011-02-21 13:19:09Z stephane $
# Maintainer : Ionut Biru<ibiru@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgbase=pyopenssl
pkgname=('pyopenssl' 'python2-pyopenssl')
pkgver=0.11
pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
url="https://launchpad.net/pyopenssl/"
license=('LGPL2.1')
makedepends=('python' 'python2' 'openssl')
source=(http://launchpad.net/${pkgname}/main/${pkgver}/+download/pyOpenSSL-${pkgver}.tar.gz)
md5sums=('9e76e57e00fa48745fcfe23944db1e6c')

build() {
    cd "${srcdir}"
    cp -a "pyOpenSSL-${pkgver}"{,-python2}

    #build python 3 module
    cd "pyOpenSSL-${pkgver}"
    python setup.py build

    #build python 3 module
    cd ../"pyOpenSSL-${pkgver}-python2"
    python2 setup.py build
}

package_pyopenssl(){
    pkgdesc="Python3 wrapper module around the OpenSSL library"
    depends=('python>=3.2' 'openssl')

    cd "${srcdir}/pyOpenSSL-${pkgver}"
    python setup.py install --root "${pkgdir}" --optimize=1
}

package_python2-pyopenssl(){
    pkgdesc="Python2 wrapper module around the OpenSSL library"
    depends=('python2>=2.7' 'openssl')

    cd "${srcdir}/pyOpenSSL-${pkgver}-python2"
    python2 setup.py install --root "${pkgdir}" --optimize=1
}