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

pkgname=mate-control-center
pkgver=1.16.0
_majorver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)/\1/"`
pkgrel=1gv
source=("http://pub.mate-desktop.org/releases/${_majorver}/mate-control-center-${pkgver}.tar.xz" "help.patch" "preferred_apps.patch")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
options=('noautodotnew')

doinst() {
# update the mime desktop database
if [ -x /usr/bin/update-desktop-database ]; then
	/usr/bin/update-desktop-database -q
fi
# update the mime database
if [ -x /usr/bin/update-mime-database ]; then
	/usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1
fi
# 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-control-center (utilities to configure the MATE desktop)"
"This package contains configuration applets for the MATE desktop,"
"allowing to set accessibility configuration, desktop fonts, keyboard"
"and mouse properties, sound setup, desktop theme and background, user"
"interface properties, screen resolution, and other MATE parameters."
)


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

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

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

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