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

pkgname=mate-utils
pkgver=1.26.0
_majorver=`echo $pkgver | cut -d'.' -f1,2`
pkgrel=1gv
source=("http://pub.mate-desktop.org/releases/${_majorver}/mate-utils-${pkgver}.tar.xz")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
options=('noautodotnew')

doinst() {
# compile schemas
if [ -x usr/bin/glib-compile-schemas ]; then
	usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas > /dev/null 2>&1
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"mate-utils (MATE desktop utilities)"
"This package contains the following utilities for the MATE desktop:"
"- mate-disk-usage-analyzer, a disk usage analyser"
"- mate-dictionary, a program which can look up the definition of"
"  words over the internet (including a panel applet to do the same)"
"- mate-search-tool, with which one can find files by name or content"
"- mate-system-log, a log viewing application"
"- mate-screenshot, a tool to take desktop screenshots and save them"
"  into a file"
)


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

	./autogen.sh \
		--prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-static \
		--disable-schemas-compile \
		--with-gtk=2.0 \
		--build=$arch-slackware-linux
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg

	# why not show the apps in other desktops?
	sed -i "/^OnlyShowIn/d" $startdir/pkg/usr/share/applications/*.desktop
}