summaryrefslogtreecommitdiff
path: root/extra/pycurl/PKGBUILD
blob: ee7b516cf32f43ff6972ffa3895ace3af9aa80b5 (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
# $Id: PKGBUILD 167931 2012-10-03 20:46:27Z andrea $
# Maintainer:
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> 

pkgbase=pycurl
pkgname=('python2-pycurl')
pkgver=7.19.0
pkgrel=2
arch=('i686' 'x86_64')
url="http://pycurl.sourceforge.net/"
license=('GPL')
makedepends=('python2' 'curl')
source=("http://pycurl.sourceforge.net/download/${pkgbase}-${pkgver}.tar.gz")
md5sums=('919d58fe37e69fe87ce4534d8b6a1c7b')

package_python2-pycurl() {
  pkgdesc="A Python 2.x interface to libcurl"
  depends=('python2' 'curl')
  replaces=('pycurl' 'python-pycurl')
  provides=('pycurl' 'python-pycurl')
  conflicts=('python-pycurl')

  cd ${pkgbase}-${pkgver}
  python2 setup.py install --curl-config=/usr/bin/curl-config \
    --prefix "${pkgdir}"/usr --optimize=1

  sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
    -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find "${pkgdir}" -name '*.py')
}