summaryrefslogtreecommitdiff
path: root/gnome-unstable/pygobject/PKGBUILD
blob: fcffe8d7ff416e303626a5237257492ae439778b (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
# $Id: PKGBUILD 153777 2012-03-19 16:57:04Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgbase=pygobject
pkgname=(python-gobject python2-gobject pygobject-devel)
pkgver=3.1.92
pkgrel=1
arch=('i686' 'x86_64')
url="https://live.gnome.org/PyGObject"
license=('LGPL')
makedepends=('python' 'python2' 'python-cairo' 'python2-cairo' 'gobject-introspection')
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz)
options=('!libtool')
sha256sums=('05f8dc92fdc2964518caea77f912589fa7bb7a100f1f5dfe40254202257c6e9d')

build() {
  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_python-gobject() {
  pkgdesc="Python 3 bindings for GObject"
  depends=('gobject-introspection' 'python-cairo' "pygobject-devel=$pkgver")

  cd "$pkgbase-$pkgver"
  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 "python2-build"
  make DESTDIR="$pkgdir" install
  mv "$pkgdir"/usr/{include,lib/pkgconfig} "$srcdir/devel"
}

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/"
}