desktop/python-pycurl/PKGBUILD

59 lines
1.7 KiB
Bash
Raw Normal View History

# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
# Contributor: Giuseppe Calà <jiveaxe@gmail.com>
_pypiname=pycurl
pkgbase=python-$_pypiname
pkgname=('python3-pycurl' 'python2-pycurl')
2014-04-14 06:11:22 +08:00
pkgver=7.19.3
pkgrel=1
arch=('x86_64')
url="http://pycurl.sourceforge.net"
license=('LGPL' 'MIT')
makedepends=('python3' 'python2' 'curl>=7.19.0' '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", "python3-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_python3-pycurl() {
pkgdesc="A Python 3.x interface to libcurl"
depends=('python3' 'curl')
2014-04-14 06:11:22 +08:00
provides=('pycurl')
cd ${_pypiname}
python3 setup.py install -O1 --curl-config=/usr/bin/curl-config --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')
2014-04-12 05:53:55 +08:00
provides=('pycurl' 'python-pycurl')
2014-04-14 06:11:22 +08:00
conflicts=('python-pycurl')
replaces=('python-pycurl')
cd python2-${_pypiname}
python2 setup.py install -O1 --curl-config=/usr/bin/curl-config --root="${pkgdir}"
install -D -m644 COPYING-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}