# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-sip _pkgname=sip pkgver=4.19.16 pkgrel=1 pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries" url="http://www.riverbankcomputing.com/software/sip/" arch="all" license="custom:sip" makedocdepends="py-sphinx" makedepends="python2-dev python3-dev" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-dev::noarch $pkgname-doc" source="https://www.riverbankcomputing.com/static/Downloads/${_pkgname}/$pkgver/${_pkgname}-$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver prepare() { default_prepare cp -r "$builddir" "$srcdir"/python2 cp -r "$builddir" "$srcdir"/python3 } build() { _build python2 _build python3 } _build() { local python="$1" export PYTHON=$python cd "$srcdir"/$python $python configure.py --sip-module PyQt5.sip make } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$srcdir/$python" make DESTDIR="$pkgdir" install install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/ } sha512sums="6a4e3e8580e914544c9037db61ab9cf05e2460cf2dbdeb67d30c949aa150952d2bb337061f7c7a9222251b04f83a1db1554ff576c3e83b8f60851b442133befa sip-4.19.16.tar.gz"