summaryrefslogtreecommitdiff
path: root/community/libdesktop-agnostic/PKGBUILD
blob: 3c0072045dc5882ae9a53546a7401969831dd58a (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
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=libdesktop-agnostic
pkgver=0.3.92
pkgrel=1
pkgdesc="Provides an extensible config API, a unified virtual fs API, and a desktop item editor for GLib-based projects."
arch=('i686' 'x86_64')
url="https://launchpad.net/libdesktop-agnostic"
license=('GPL' 'LGPL')
depends=('glib2' 'gtk2' 'pygtk' 'pygobject')
makedepends=('gobject-introspection' 'vala>=0.8.1' 'intltool'
             'gconf')
optdepends=('gconf: gconf configuration backend')
options=('!libtool')
backup=(etc/xdg/libdesktop-agnostic/desktop-agnostic.ini)
source=(https://launchpad.net/$pkgname/0.4/$pkgver/+download/$pkgname-$pkgver.tar.gz
        gir.patch)
md5sums=('42374d226a21d57637f97173f6b105a1'
         '346e06ae914ec0c12e5f1fa1c4796575')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # Force source regeneration
  rm -r gen_src

  # fix for python 2.7
  sed -i '1s|^#!.*python$|&2|' waf
  export PYTHON=/usr/bin/python2

  # fix to enable introspection
  patch -Np1 -i "$srcdir/gir.patch"

  ./waf configure --config-backends=gconf,keyfile --vfs-backends=gio \
      --desktop-entry-backends=gio,glib --prefix=/usr --sysconfdir=/etc
  ./waf
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  ./waf install --destdir="$pkgdir" --sysconfdir="$pkgdir/etc"
}