#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=mate-dialogs
pkgver=1.4.0
pkgrel=2rl
source=("http://pub.mate-desktop.org/releases/1.4/mate-dialogs-1.4.0.tar.xz" "help.patch")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"mate-dialogs (Display graphical dialog boxes from shell scripts)"
"MATE Dialogs allows you to display GTK+ dialogs from shell scripts; it"
"is a fork of zenity, which in turn is a rewrite of the gdialog command"
"from GNOME 1. A symlink for zenity is provided, so scripts that use"
"zenity can be run with matedialog."
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	patch -p1 < $startdir/src/help.patch || exit 1
	
	./autogen.sh --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-scrollkeeper \
		--enable-libnotify \
		--build=$arch-slackware-linux
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg

	# create a zenity symlink
	(
	 cd $startdir/pkg/usr/bin
	 ln -sf matedialog zenity
	)

	# remove unnecessary help files
	find $startdir/pkg/usr/share/mate/help/matedialog/* -maxdepth 0 -type d ! -name C -exec rm -rf {} \;
}