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

pkgname=mate-panel
pkgver=1.24.0
_mainver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)/\1/"`
pkgrel=2slint
source=("http://pub.mate-desktop.org/releases/${_mainver}/mate-panel-${pkgver}.tar.xz" "slint.layout" "1000_import_upstream_fixes_for_highcontrast_theme.patch" )
docs=("readme" "install" "copying*" "changelog" "authors" "news" "todo" "hacking" "maintainers")
options=('noautodotnew' 'nosrcpack')

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-panel (GTK+2 Panel for MATE)"
"The MATE Panel package contains hooks to the menu sub-system and the" 
"applet sub-system."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
#	Don't apply this patch, our GTK version doen't fit 
#	patch -p1 --verbose < $startdir/1000_import_upstream_fixes_for_highcontrast_theme.patch
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-schemas-compile \
		--disable-static \
		--build=$arch-slackware-linux
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg
	mkdir -p $PKG/usr/doc/$pkgname-$pkgver
	ln -s $PKG/usr/share/gtk-doc/html/$pkgname $PKG/usr/doc/$pkgname-$pkgver/html

	# use our own default panel settings
	mv $startdir/pkg/usr/share/mate-panel/layouts/default.layout $startdir/pkg/usr/share/mate-panel/layouts/default-mate.layout
	cp $startdir/slint.layout $startdir/pkg/usr/share/mate-panel/layouts/default.layout
} 
