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

pkgname=libmatekbd
pkgver=1.8.0
pkgrel=1gv
source=("http://pub.mate-desktop.org/releases/1.8/libmatekbd-1.8.0.tar.xz" "flags.tar.gz" "salix.patch")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
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
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"libmatekbd (library to manage keyboard configuration)"
"libmatekbd is a library to manage keyboard configuration in the MATE"
"desktop environment."
)


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

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

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

	# Install flags
	mkdir -p $startdir/pkg/usr/share/pixmaps
	cp -a $startdir/src/flags $startdir/pkg/usr/share/pixmaps
	(
	cd $startdir/pkg/usr/share/pixmaps/flags
	ln -s gr.png el.png
	ln -s uk.png gb.png
	)
}