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

pkgname=gnome-keyring
pkgver=2.28.2
pkgrel=1gv
arch=x86_64
source=("ftp://ftp.gnome.org/pub/gnome/sources/gnome-keyring/2.28/gnome-keyring-$pkgver.tar.bz2")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=ftp://ftp.gnome.org/pub/gnome/sources/gnome-keyring
options=('noautodotnew')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"gnome-keyring (GNOME keyring services)"
"gnome-keyring is a daemon in the session, similar to ssh-agent, and"
"other applications can use it to store passwords and other sensitive"
"information."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var/lib --sysconfdir=/etc --disable-pam --disable-schemas-install --with-gconf-source="xml::/etc/gconf/gconf.xml.defaults"
	make -j3 || return 1
	make install DESTDIR=$startdir/pkg
	
	sed -i "/OnlyShowIn=GNOME;/d" $startdir/pkg/etc/xdg/autostart/gnome-keyring-daemon.desktop

	# 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
} 
