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

pkgname=liferea
pkgver=1.6.5
pkgrel=1gv
source=("http://prdownloads.sourceforge.net/liferea/liferea-$pkgver.tar.gz")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url="http://liferea.sourceforge.net/"
options=('noautodotnew')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"liferea (an aggregator for online news feeds)"
"Liferea tries to create a fast, easy to use, easy to install news"
"aggregator for GTK/GNOME."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --disable-schemas-install --with-gconf-source="xml::/etc/gconf/gconf.xml.defaults"
	make || return 1
	make install DESTDIR=$startdir/pkg
	
	# gconf stuff
	export GCONF_CONFIG_SOURCE="xml::$startdir/pkg/etc/gconf/gconf.xml.defaults"
	if [ -d $startdir/pkg/etc/gconf/schemas ]; then
		install -v -d -m755 $startdir/pkg/etc/gconf/gconf.xml.defaults
		SCHEMAS=$startdir/pkg/etc/gconf/schemas
		for schema in $SCHEMAS/*.schemas; do
			gconftool-2 --makefile-install-rule $schema
		done
		# Reset / Verify correct permissions
		( cd $startdir/pkg/etc/gconf ; find . -type d -exec chmod 755 {} \; )
		( cd $startdir/pkg/etc/gconf ; find . -type f -exec chmod 644 {} \; )
	fi
}