aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-gtk/APKBUILD
blob: cda942073138539a3642851550e2f6dfd13ac99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-gtk
pkgver=2.22.0
pkgrel=3
pkgdesc="Python bindings for the GTK widget set"
url="http://www.pygtk.org/"
arch="all"
license="LGPL"
depends="py-cairo py-gobject"
makedepends="libglade-dev py-cairo-dev py-gobject-dev python-dev"
source="http://ftp.gnome.org/pub/gnome/sources/pygtk/${pkgver%.*}/pygtk-$pkgver.tar.bz2"
subpackages="$pkgname-dev $pkgname-doc $pkgname-demo"

_builddir="$srcdir"/pygtk-$pkgver
build() {
	cd "$_builddir"
	./configure --prefix=/usr || return 1
	make || return 1
}

dev() {
	default_dev
	rm -rf "$subpkgdir"/usr/lib/python2.6/site-packages/gtk-2.0/*.la \
		"$subpkgdir"/usr/lib/python2.6/site-packages/gtk-2.0/gtk/*.la
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -m644 gtk/gtk-extrafuncs.defs ""$pkgdir"/usr/share/pygtk/2.0/defs/" || return 1
}

demo() {
	pkgdesc="Demonstration of pygtk"
	depends="py-gtk"
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/pygtk/2.0
	mv "$pkgdir"/usr/bin/pygtk-demo "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/lib/pygtk/2.0/*demo* \
		"$subpkgdir"/usr/lib/pygtk/2.0/
}
md5sums="e9bba9cd4cdaccb22a7991cc2f7c8373  pygtk-2.22.0.tar.bz2"