# Contributor: Leo # Maintainer: Natanael Copa pkgname=py-dbus _pkgname=dbus-python pkgver=1.2.8 pkgrel=4 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 py2-sphinx" checkdepends="bash dbus py-gobject3 py-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 \ --enable-documentation make cd ../build-python3 "$builddir/configure" \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ PYTHON_VERSION=3 make } check() { cd "$builddir" cd "../build-python2" make check 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="6e486fd560944fc1461a27e6798e2c348c7fdf351602c082a0614c0a6822ff147875212bdcb1f818c0ab12470cffc613c0ffbd292cd9d445d3429bee65765905 dbus-python-1.2.8.tar.gz"