summaryrefslogtreecommitdiff
path: root/gnome-unstable/pygobject/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /gnome-unstable/pygobject/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'gnome-unstable/pygobject/PKGBUILD')
-rw-r--r--gnome-unstable/pygobject/PKGBUILD75
1 files changed, 75 insertions, 0 deletions
diff --git a/gnome-unstable/pygobject/PKGBUILD b/gnome-unstable/pygobject/PKGBUILD
new file mode 100644
index 000000000..53ad2525a
--- /dev/null
+++ b/gnome-unstable/pygobject/PKGBUILD
@@ -0,0 +1,75 @@
+# $Id: PKGBUILD 116417 2011-03-23 18:26:48Z heftig $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=pygobject
+pkgname=(pygobject py3gobject pygobject-devel)
+pkgver=2.28.3
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('glib2' 'gobject-introspection')
+makedepends=(python python2 python-cairo python2-cairo)
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgbase}/${pkgver%.*}/${pkgbase}-${pkgver}.tar.bz2)
+options=('!libtool')
+url="http://www.pygtk.org/"
+sha256sums=('7da88c169a56efccc516cebd9237da3fe518a343095a664607b368fe21df95b6')
+
+build() {
+ cd "${srcdir}"
+ cp -a "${pkgbase}-${pkgver}" python2-build
+ mkdir devel
+
+ (
+ cd python2-build
+ export PYTHON=/usr/bin/python2
+ ./configure --prefix=/usr
+ make
+ )
+
+ (
+ cd "${pkgbase}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+ )
+}
+
+package_pygobject() {
+ pkgdesc="Python 2 bindings for GObject"
+ depends+=(python2 python2-cairo)
+
+ cd "${srcdir}/python2-build"
+ make DESTDIR="${pkgdir}" install
+
+ find "$pkgdir"/usr/share/pygobject -name '*.py' | \
+ xargs sed -i "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ # Split devel stuff
+ mv "$pkgdir"/usr/{bin,include,lib/pkgconfig,share/{gtk-doc,pygobject/{2.0/codegen,xsl}}} \
+ "$srcdir/devel/"
+}
+
+package_py3gobject() {
+ pkgdesc="Python 3 bindings for GObject"
+ depends+=(python python-cairo)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Delete devel stuff
+ rm -r "$pkgdir"/usr/{bin,include,lib/pkgconfig,share/{gtk-doc,pygobject/{2.0/codegen,xsl}}}
+}
+
+package_pygobject-devel() {
+ pkgdesc="Development files for the pygobject bindings"
+ depends=(python2)
+
+ cd "${srcdir}/devel"
+ mkdir -p "$pkgdir"/usr/{include,lib,share/pygobject/2.0}
+
+ mv bin "$pkgdir/usr/"
+ mv include "$pkgdir/usr/"
+ mv pkgconfig "$pkgdir/usr/lib/"
+ mv gtk-doc "$pkgdir/usr/share/"
+ mv codegen "$pkgdir/usr/share/pygobject/2.0/"
+ mv xsl "$pkgdir/usr/share/pygobject/"
+}