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

pkgname=libmateweather
pkgver=1.26.2
_mainver=`echo $pkgver | cut -d'.' -f1,2`
pkgrel=1gv
source=("http://pub.mate-desktop.org/releases/${_mainver}/libmateweather-${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
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"libmateweather (a library to access weather information)"
"libmateweather is a library to access weather information from online"
"services for numerous locations."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--build=$arch-slackware-linux \
		--disable-static \
		--disable-schemas-compile \
		--with-gtk=3.0
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg

	# put icons in hicolor dir, not everyone has to use the mate
	# icon theme
	mkdir -p $startdir/pkg/usr/share/icons/hicolor
	mv $startdir/pkg/usr/share/icons/mate/* $startdir/pkg/usr/share/icons/hicolor/
	rmdir $startdir/pkg/usr/share/icons/mate

	# remove gtk-doc
	rm -rf $startdir/pkg/usr/share/gtk-doc
}