2014-06-24 11:13:13 +00:00
|
|
|
# Template file for 'python-curl'
|
|
|
|
pkgname=python-curl
|
|
|
|
version=7.19.3.1
|
2014-06-27 08:01:47 +00:00
|
|
|
revision=2
|
2014-06-24 11:13:13 +00:00
|
|
|
wrksrc="pycurl-${version}"
|
|
|
|
build_style=python-module
|
|
|
|
python_versions="2.7 3.4"
|
|
|
|
hostmakedepends="libcurl-devel python-devel python3.4-devel"
|
|
|
|
makedepends="openssl-devel ${hostmakedepends}"
|
|
|
|
depends="python curl"
|
|
|
|
replaces="pycurl>=0"
|
|
|
|
pycompile_module="curl"
|
|
|
|
short_desc="Python2 interface to cURL library"
|
|
|
|
homepage="http://pycurl.sourceforge.net/"
|
|
|
|
license="LGPL-2.1, MIT"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
distfiles="http://pycurl.sourceforge.net/download/pycurl-${version}.tar.gz"
|
|
|
|
checksum=c0d673fe99a9de07239eabe77c798f1b043f60c02afaec1430ceaf59d7501a4f
|
|
|
|
|
|
|
|
CFLAGS="${CFLAGS} -fno-strict-aliasing"
|
|
|
|
|
2014-06-27 08:01:47 +00:00
|
|
|
_doc_install() {
|
|
|
|
vmkdir /usr/share/doc/${pkgname}
|
|
|
|
vcopy "doc examples tests AUTHORS ChangeLog INSTALL.rst README.rst" /usr/share/doc/${pkgname}
|
2014-06-24 11:13:13 +00:00
|
|
|
# install licenses
|
|
|
|
vinstall COPYING-LGPL 644 usr/share/licenses/${pkgname}
|
|
|
|
vinstall COPYING-MIT 644 usr/share/licenses/${pkgname}
|
|
|
|
}
|
|
|
|
|
2014-06-27 08:01:47 +00:00
|
|
|
post_install() {
|
|
|
|
# remove documentation as installed by setup.py
|
|
|
|
rm -rf ${DESTDIR}/usr/share/doc
|
|
|
|
_doc_install
|
|
|
|
}
|
|
|
|
|
2014-06-24 11:13:13 +00:00
|
|
|
python3.4-curl_package() {
|
|
|
|
depends="python3.4 curl"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="curl"
|
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove /usr/lib/python3.4
|
|
|
|
cd ${wrksrc}
|
2014-06-27 08:01:47 +00:00
|
|
|
find . -name '*.py' -exec sed -i -e 's,#! /usr/bin/env python,&3.4,' {} +
|
|
|
|
_doc_install
|
2014-06-24 11:13:13 +00:00
|
|
|
}
|
|
|
|
}
|