summaryrefslogtreecommitdiff
path: root/extra/python-pycurl
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-07 03:24:01 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-07 03:24:01 +0000
commitb4f09e0a566f01cd9a250e2f44423169c70adc94 (patch)
treed407e83c47735fe0d24a6be03937a1d84f41c1cf /extra/python-pycurl
parentae5e27e4900c0c38025462f59e0524aef7aa630b (diff)
Fri Feb 7 03:21:50 UTC 2014
Diffstat (limited to 'extra/python-pycurl')
-rw-r--r--extra/python-pycurl/PKGBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/extra/python-pycurl/PKGBUILD b/extra/python-pycurl/PKGBUILD
new file mode 100644
index 000000000..86bd6201c
--- /dev/null
+++ b/extra/python-pycurl/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 205506 2014-02-06 10:55:43Z fyan $
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+
+_pypiname=pycurl
+pkgbase=python-$_pypiname
+pkgname=('python-pycurl' 'python2-pycurl')
+pkgver=7.19.3.1
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://pycurl.sourceforge.net/"
+license=('LGPL' 'MIT')
+makedepends=('python' 'python2' 'curl' 'git')
+source=("git+https://github.com/pycurl/pycurl.git#tag=REL_${pkgver//./_}")
+sha1sums=('SKIP')
+
+prepare() {
+ cp -r ${_pypiname} python2-${_pypiname}
+
+ cd "${srcdir}/${_pypiname}"
+ find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python3|" {} +
+ sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python-pycurl"/' setup.py
+
+ cd "${srcdir}/python2-${_pypiname}"
+ find . -name '*.py' -exec sed -i -e "s|#! /usr/bin/env python|#!/usr/bin/env python2|" {} +
+ sed -i 's/"share", "doc", PACKAGE/"share", "doc", "python2-pycurl"/' setup.py
+}
+
+build() {
+ cd "${srcdir}/${_pypiname}"
+ python3 setup.py build --with-ssl
+
+ cd "${srcdir}/python2-${_pypiname}"
+ python2 setup.py build --with-ssl
+}
+
+package_python-pycurl() {
+ pkgdesc="A Python 3.x interface to libcurl"
+ depends=('python' 'curl')
+
+ cd ${_pypiname}
+ python setup.py install -O1 --root="${pkgdir}"
+ install -D -m644 COPYING-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-pycurl() {
+ pkgdesc="A Python 2.x interface to libcurl"
+ depends=('python2' 'curl')
+
+ cd python2-${_pypiname}
+ python2 setup.py install -O1 --root="${pkgdir}"
+ install -D -m644 COPYING-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}