# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-sip _pkgname=sip pkgver=4.19.18 pkgrel=0 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="e3c58cc6c38b277b3b9fd7adf33df91b47e0385e59d52c543e630a194d73d04d91e0a3845cb3973d1955f77049e75246fa7e6f544e02e1efe0086a297cf1d887 sip-4.19.18.tar.gz"