# Contributor: Leo # Maintainer: Natanael Copa pkgname=py-dbus _pkgname=dbus-python pkgver=1.2.10 pkgrel=0 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="7849f494ae31020dacbd47e07ad6ef596146700a6a60c71b1af3e60c0de140c2a67ab160f8b9d2a041ad60a931667bd96cca2479065549ac8301b5940829ab2c dbus-python-1.2.10.tar.gz"