# Maintainer: György Balló <ballogy@freestart.hu>
# CCR mainainter: CTown <ctownthug711@aol.com>
pkgname=libdbusmenu
pkgver=0.5.1
pkgrel=1
pkgdesc="A small little library that was created by pulling out some common code out of indicator-applet"
arch=('i686' 'x86_64')
url="https://launchpad.net/dbusmenu"
license=('LGPL')
makedepends=('gtk2>=2.16' 'intltool>=0.35.0' 'gnome-doc-utils>=0.3.2' 'gobject-introspection>=0.10.0' 'vala' 'python2')
options=(!libtool !emptydirs)
source=(http://launchpad.net/dbusmenu/0.5/$pkgver/+download/$pkgname-$pkgver.tar.gz)
md5sums=('9742c8b4e04d99f2d187041272052b53')
build() {
cd "$srcdir/$pkgname-$pkgver"
sed -i 's@^#!.*python$@#!/usr/bin/python2@' tools/dbusmenu-bench
# Use different location for header files for GTK+3
sed -i 's/libdbusmenu-0.4/libdbusmenu3-0.4/' libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc.in
sed -i 's|libdbusmenu-0.4/libdbusmenu-gtk$(VER)|libdbusmenu$(VER)-0.4/libdbusmenu-gtk|' libdbusmenu-gtk/Makefile.in
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
--disable-static --disable-scrollkeeper --disable-tests --disable-gtk
make
}
package() {
depends=('glib2>=2.26')
optdepends=('python2: for dbusmenu-dumper tool'
'gtk2: for dbusmenu-bench tool')
cd "$srcdir/$pkgname-$pkgver"
make -C libdbusmenu-glib DESTDIR="$pkgdir/" install
make -C tools DESTDIR="$pkgdir/" install
make -C docs DESTDIR="$pkgdir/" install
}