# Contributor: Leo # Maintainer: Natanael Copa pkgname=py-dbus _pkgname=dbus-python pkgver=1.2.12 pkgrel=2 pkgdesc="Python bindings for DBUS" url="http://www.freedesktop.org/wiki/Software/DBusBindings" arch="all" license="MIT" depends_dev="py-dbus" makedepends="dbus-glib-dev python2-dev python3-dev py3-sphinx" checkdepends="bash dbus py3-gobject3 py3-tappy" subpackages="$pkgname-dev $pkgname-doc py2-dbus:_py2 py3-dbus:_py3" source="https://dbus.freedesktop.org/releases/dbus-python/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" prepare() { cd "$builddir" mkdir ../build-python2 mkdir ../build-python3 default_prepare } build() { cd "$builddir" cd ../build-python2 "$builddir/configure" \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr make cd ../build-python3 "$builddir/configure" \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-documentation \ PYTHON_VERSION=3 make } check() { cd "$builddir" cd "../build-python3" make check } package() { cd "$builddir" cd "../build-python2" make DESTDIR="$pkgdir" install cd "../build-python3" make DESTDIR="$pkgdir" install } _py2() { replaces="py-dbus" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/$python* "$subpkgdir"/usr/lib/ } sha512sums="6f90eaeeb74ea71a026a331d4c611911eda6dfb6c9086a0a80352f9963a9ae126db6f3e32d183916b8517f177fc947f1ddb15df83ff0b5c886532116868383b4 dbus-python-1.2.12.tar.gz"