#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

pkgname=gmrun
pkgver=0.9.2
pkgrel=2rl
source=("http://surfnet.dl.sourceforge.net/project/gmrun/gmrun/$pkgver/gmrun-$pkgver.tar.gz" "gmrun-0.9.2-gcc43.patch" "gmrunrc" "gmrun-0.9.2-mousewheel.patch" "gtkcompletionline.cc.patch")
url="http://sourceforge.net/projects/gmrun/"
docs=('AUTHORS' 'ChangeLog' 'COPYING' 'NEWS' 'README')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (run program tool)"
"gmrun is a simple program which provides a 'run program' window,"
"featuring a bash-like TAB completion. It uses GTK+ interface."
)

build() {
	cd $SRC/${pkgname}-${pkgver}
	patch -p1 < $SRC/gmrun-0.9.2-gcc43.patch || return 1
	patch -p1 < $SRC/gmrun-0.9.2-mousewheel.patch || return 1
	# And one from Gentoo
	patch -p1 < $SRC/gtkcompletionline.cc.patch || return 1

	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc
	make -j3 || return 1
	make DESTDIR=$startdir/pkg/ install || return 1

	# custom gmrunrc file
	cp ../gmrunrc $PKG/usr/share/gmrun/gmrunrc
}