summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0218e3b9891b7eb61f8787844f0fc105cb3e13e8 (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
# Maintainer: Joao Cordeiro <jlcordeiro at gmail dot com>
# Contributor: <arsenm2@rpi.edu>
# Contributor: Lubosz Sarnecki <lubosz@gmail.com>

_pkgname=gobject-introspection
pkgname="${_pkgname}-git"
pkgver=1.45.2.3354.fb91f7e
pkgrel=1
pkgdesc="GObject Introspection"
epoch=1
arch=('x86_64' 'i686')
license=('LGPL' 'GPL')
url="http://live.gnome.org/GObjectIntrospection/"
depends=("glib2-git" 'python2' 'python2-mako')
makedepends=('git' 'pkgconfig' 'autoconf' 'gtk-doc' 'gnome-common-git'
  'bison' 'cairo' 'mesa' 'flex')
provides=("gobject-introspection=${_realver}" "gobject-introspection-runtime=${_realver}")
conflicts=('gobject-introspection' 'gobject-introspection-svn' "gobject-introspection-runtime")
replaces=('gobject-introspection-svn')
options=(!makeflags docs !libtool strip debug)

source=("git+git://git.gnome.org/$_pkgname")
md5sums=("SKIP")

subver() {
  PREFIX="m4_define(gi_$1_version, "
  echo $(grep "$PREFIX" configure.ac | eval sed "'s/$PREFIX//'" | sed 's/)//')
}
 
pkgver() {
  cd "$srcdir/$_pkgname"
  hash=$(git log --pretty=format:'%h' -n 1)
  revision=$(git rev-list --count HEAD)
  echo $(subver major).$(subver minor).$(subver micro).$revision.$hash
}

build() {
  cd "$srcdir/$_pkgname"
  export PYTHON=/usr/bin/python2
  ./autogen.sh --prefix=/usr --disable-static --enable-doctool
  make
}

package() {
  cd "$srcdir/$_pkgname"
  make DESTDIR="$pkgdir" install

  sed -i '1s|#!/usr/bin/env python$|&2|' \
    "$pkgdir"/usr/lib/gobject-introspection/giscanner/*.py
}