# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-gobject
pkgver=2.28.6
pkgrel=6
pkgdesc="Python bindings for the GObject library"
url="http://www.pygtk.org/"
arch="all"
license="GPL"
makedepends="libffi-dev glib-dev python2-dev py2-cairo-dev"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" #*** No rule to make target 'Regress-1.0.typelib', needed by 'check-local'.
source="https://download.gnome.org/sources/pygobject/${pkgver%.*}/pygobject-$pkgver.tar.bz2"
builddir="$srcdir"/pygobject-$pkgver

prepare() {
	cd "$builddir"
	update_config_sub || return 1
}

build() {
	cd "$builddir"
	CFLAGS="$CFLAGS -D_GNU_SOURCE" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-introspection \
		|| return 1
	make || return 1
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="b29da45a45b3099c1153978cc507fcea156e66fd1dbadb565c19b201b29a96414cba819507993cfc6190916a90c586b6cca2b777e21b72be929711462a852b88  pygobject-2.28.6.tar.bz2"
