# Maintainer: Ionut Biru pkgbase=pygobject pkgname=(python2-gobject python3-gobject pygobject-devel) pkgver=3.14.0 pkgrel=1 arch=('x86_64') url="https://live.gnome.org/PyGObject" license=(LGPL) makedepends=(python2 python2-cairo gobject-introspection gnome-common python3 python3-cairo) source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver:0:4}/$pkgbase-$pkgver.tar.xz) sha256sums=('779effa93f4b59cdb72f4ab0128fb3fd82900bf686193b570fd3a8ce63392d54') prepare() { mkdir build-py2 build-py3 devel cd ${pkgbase}-${pkgver} sed -i '/Werror=format/d' configure # gcc 4.8 } build() { cd build-py2 ../${pkgbase}-${pkgver}/autogen.sh --prefix=/usr --with-python=/usr/bin/python2 make # enable at a later point cd ../build-py3 ../${pkgbase}-${pkgver}/configure --prefix=/usr --with-python=/usr/bin/python3 make } package_python3-gobject() { pkgdesc="Python 3 bindings for GObject" depends=('gobject-introspection' 'python3-cairo' "pygobject-devel=$pkgver") cd build-py3 make DESTDIR="$pkgdir" install rm -r "$pkgdir"/usr/{include,lib/pkgconfig} } package_python2-gobject() { pkgdesc="Python 2 bindings for GObject" depends=('gobject-introspection' 'python2-cairo' "pygobject-devel=$pkgver") cd build-py2 make DESTDIR="$pkgdir" install mv "$pkgdir"/usr/{include,lib/pkgconfig} "$srcdir/devel" python2 -m compileall "$pkgdir"//usr/lib/python2.7/site-packages/gi } package_pygobject-devel() { pkgdesc="Development files for the pygobject bindings" cd "devel" mkdir -p "$pkgdir"/usr/{include,lib} mv include "$pkgdir/usr/" mv pkgconfig "$pkgdir/usr/lib/" }