#Packager: George Vlahavas (vlahavas~at~gmail~dot~com)

pkgname=mate-applets
pkgver=1.8.0
pkgrel=1gv
source=("http://pub.mate-desktop.org/releases/1.8/mate-applets-1.8.0.tar.xz" "help.patch")
docs=("readme" "install" "copying*" "changelog" "authors" "news" "todo" "hacking" "maintainers")
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-applets (MATE Panel Applets)"
"MATE Applets are small applications which generally run in the"
"background and display their output to the MATE panel."
)


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

	patch -p1 < $startdir/src/help.patch || exit 1

	./configure --prefix=/usr \
		--localstatedir=/var \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--sysconfdir=/etc \
		--disable-schemas-compile \
		--disable-static \
		--build=$arch-slackware-linux \
		--disable-static \
		--with-gtk=2.0 \
		--enable-stickynotes

	make || return 1
	make install DESTDIR=$startdir/pkg
	
	rm -rf $startdir/pkg/usr/share/gtk-doc

	# remove unnecessary help files
	rm -rf $startdir/pkg/usr/share/help

	# put icons in hicolor dir, not everyone has to use the mate
	# icon theme
	mv $startdir/pkg/usr/share/icons/mate/48x48/apps/ax-applet.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/
	rm -rf $startdir/pkg/usr/share/icons/mate
} 
