updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / libdesktop-agnostic-bzr / PKGBUILD
blob5f0e62def2aa0a4e8c3c039a121bacb32c7d1131
1 # Maintainer: Alessio Sergi <asergi at archlinux dot us>
3 pkgname=libdesktop-agnostic-bzr
4 _pkgname=libdesktop-agnostic
5 pkgver=405
6 pkgrel=2
7 pkgdesc="A desktop-agnostic library for GLib-based projects"
8 arch=('i686' 'x86_64')
9 url="https://launchpad.net/libdesktop-agnostic"
10 license=('GPL2' 'LGPL2.1')
11 depends=('pygtk' 'python2-gobject2')
12 makedepends=('bzr' 'gconf' 'gobject-introspection' 'intltool' 'vala-012')
13 optdepends=('gconf: gconf configuration backend')
14 provides=($_pkgname)
15 conflicts=($_pkgname)
16 backup=(etc/xdg/$_pkgname/desktop-agnostic.ini)
17 options=('!libtool')
18 source=('gir.patch')
19 md5sums=('69bf989b9204fe886c958b279822696c')
21 _bzrtrunk="https://code.launchpad.net/~lda-team/libdesktop-agnostic/trunk"
22 _bzrmod="$_pkgname"
24 build() {
25   cd "$srcdir"
27   msg "Connecting to Bazaar server...."
29   if [[ -d "$_bzrmod" ]]; then
30     cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
31     msg "The local files are updated."
32   else
33     bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
34   fi
36   msg "Bazaar checkout done or server timeout"
37   msg "Starting build..."
39   rm -rf "$srcdir/$_bzrmod-build"
40   cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
41   cd "$srcdir/$_bzrmod-build"
43   # fix to turn on introspection
44   patch -Np1 -i "$srcdir"/gir.patch
46   # python2 fix
47   sed -i '1s|^#!.*python$|&2|' waf
49   export PYTHON="/usr/bin/python2"
50   export VALAC="/opt/vala-0.12/bin/valac"
52   ./waf configure --prefix=/usr --sysconfdir=/etc \
53                   --config-backends=gconf,keyfile \
54                   --vfs-backends=gio \
55                   --desktop-entry-backends=gio,glib
56   ./waf
59 package() {
60   cd "$srcdir/$_bzrmod-build"
62   ./waf install --destdir="$pkgdir/" --sysconfdir="$pkgdir"/etc
65 # vim:set ts=2 sw=2 et: