summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/pygobject2/PKGBUILD
blob: ba3d0354226d8d78c8c03c747246dba479497d99 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=pygobject2
pkgname=(python2-gobject2 pygobject2-devel)
pkgver=2.28.6
pkgrel=12
arch=(i686 x86_64)
url="http://www.pygtk.org/"
license=(LGPL)
makedepends=(python2 git)

# pygobject-2-28 branch: https://git.gnome.org/browse/pygobject/log/?h=pygobject-2-28
source=('git://git.gnome.org/pygobject#commit=9456ba7')
sha256sums=('SKIP')

prepare() {
  cd pygobject
  autoreconf -fi

  cp -a . ../python2-build

  find -O3 ../python2-build \
    \( -name '*.py' -o -name '*.py.in' \) \
    -exec sed -i '1s|python$|&2|' {} +
}

build() {
  cd python2-build
  ./configure --prefix=/usr --disable-introspection \
    PYTHON=/usr/bin/python2
  make

  cd ../pygobject
#  ./configure --prefix=/usr --disable-introspection
#  make
}

#package_python-gobject2() {
#  pkgdesc="Python 3 bindings for GObject2"
#  depends=(glib2 pygobject2-devel python)
#  replaces=(py3gobject)
#  provides=("py3gobject=$pkgver")

#  cd pygobject
#  make DESTDIR="$pkgdir" install

  # Delete devel stuff
#  rm -r "$pkgdir"/usr/{include,lib/pkgconfig,share/{gtk-doc,pygobject/xsl}}
#}

package_python2-gobject2() {
  pkgdesc="Python 2 bindings for GObject2"
  depends=(glib2 pygobject2-devel python2)
  replaces=(pygobject)
  provides=("pygobject=$pkgver")

  cd python2-build
  make DESTDIR="$pkgdir" install

  rm -r "$pkgdir"/usr/share/gtk-doc

  # Split devel stuff
  cd ..
  mkdir -p devel/usr/{lib,share/pygobject}
  mv {"$pkgdir",devel}/usr/include
  mv {"$pkgdir",devel}/usr/lib/pkgconfig
  mv {"$pkgdir",devel}/usr/share/pygobject/xsl
}

package_pygobject2-devel() {
  pkgdesc="Development files for the pygobject bindings"
  mv devel/* "$pkgdir"
}