74 lines
2 KiB
Text
74 lines
2 KiB
Text
# Template file for 'python-curl'
|
|
pkgname=python-curl
|
|
version=7.19.3.1
|
|
revision=1
|
|
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"
|
|
|
|
post_extract() {
|
|
cp -a ${wrksrc} /tmp/python2-build
|
|
cp -a ${wrksrc} /tmp/python3.4-build
|
|
mv /tmp/python{2,3.4}-build ${wrksrc}
|
|
}
|
|
|
|
pre_build() {
|
|
cd ${wrksrc}/python2-build
|
|
sed -i -e 's/"COPYING-LGPL", "COPYING-MIT",//' \
|
|
-e 's/"share", "doc", PACKAGE/"share", "doc", "python-curl"/' setup.py
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
find . -name '*.py' -exec sed -i -e 's|#! /usr/bin/env python|&3.4|' {} +
|
|
sed -i -e 's/"COPYING-LGPL", "COPYING-MIT",//' \
|
|
-e 's/"share", "doc", PACKAGE/"share", "doc", "python3.4-curl"/' setup.py
|
|
}
|
|
|
|
do_build() {
|
|
cd ${wrksrc}/python2-build
|
|
python setup.py build
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
python3.4 setup.py build
|
|
}
|
|
|
|
do_install() {
|
|
cd ${wrksrc}/python2-build
|
|
python setup.py install --root=${DESTDIR}
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
python3.4 setup.py install --root=${DESTDIR}
|
|
}
|
|
|
|
post_install() {
|
|
# install licenses
|
|
vinstall COPYING-LGPL 644 usr/share/licenses/${pkgname}
|
|
vinstall COPYING-MIT 644 usr/share/licenses/${pkgname}
|
|
}
|
|
|
|
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
|
|
vmove /usr/share/doc/python3.4-curl
|
|
# install licenses
|
|
cd ${wrksrc}
|
|
vinstall COPYING-LGPL 644 usr/share/licenses/${pkgname}
|
|
vinstall COPYING-MIT 644 usr/share/licenses/${pkgname}
|
|
}
|
|
}
|